Re: How to make the default gateway permanent after restart?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2004-09-20 at 11:17, Deepak Seshadri wrote:
> Hello everybody,
> 
>  
> 
> My Linux firewall (Fedora Core 2 & kernel 2.6.8.1) 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 up
> the Internet connection but also my firewall rules. I have to then manually
> delete that entry and add Eth0 as the default gateway. Could someone please
> let me know how to make Eth0 as the permanent default gateway?
> 
>  
> 
> Thank you,
> 
> Deepak Seshadri
> 
>  

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

        http://www.redhat.com/mailman/listinfo/fedora-list

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.
</rant>

your default gateway is set by the variable GATEWAY in:

        /etc/sysconfig/network

the GATEWAY variable can also be set in your:

        /etc/sysconfig/network-scripts/ifcfg-eth?
        
files.

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.

-j

-- 
Jason Opperisano <opie@xxxxxxxxxxx>



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux