How to make the default gateway permanent after restart?

Deepak Seshadri dseshadri at
Mon Sep 20 17:52:42 CEST 2004

Hello Jason,

Thank you very much.

Yes I meant via eth0.

Thank you,

Deepak Seshadri

-----Original Message-----
From: netfilter-bounces at
[mailto:netfilter-bounces at] On Behalf Of Jason Opperisano
Sent: Monday, September 20, 2004 11:26 AM
To: netfilter at
Subject: Re: How to make the default gateway permanent after restart?

On Mon, 2004-09-20 at 11:17, Deepak Seshadri wrote:
> Hello everybody,
> My Linux firewall (Fedora Core 2 & kernel is configured the
> following way:
> Eth0 - WAN
> Eth1 - LAN
> Eth2 - DMZ
> With the above setup my default gateway is Eth0. For some reason, when the
> machine boots up it takes Eth1 for default gateway. This not only messes
> the Internet connection but also my firewall rules. I have to then
> delete that entry and add Eth0 as the default gateway. Could someone
> let me know how to make Eth0 as the permanent default gateway?
> Thank you,
> Deepak Seshadri

there's a list maintained for fedora core questions at:

i'm not trying to be a "mean guy" but this list has a tendency towards
being the dumping ground for all network-related linux questions, and
it's not.

your default gateway is set by the variable GATEWAY in:


the GATEWAY variable can also be set in your:


if you specify it both places, RH used to have a tendency to add it
twice, i don't know if they've fixed this (by using 'ip route replace'
instead of 'ip route add').

i also hope you mean your default gateway is "via eth0" not "is eth0"
because if it's the latter--you've have bigger problems than just a
variable setting.


Jason Opperisano <opie at>

More information about the netfilter mailing list