Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 540 - Setting up Gateway routes on other network devices
Summary: Setting up Gateway routes on other network devices
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Martin Schlemmer (RETIRED)
Depends on:
Reported: 2002-02-05 04:56 UTC by Peter Foley
Modified: 2003-02-04 19:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Peter Foley 2002-02-05 04:56:45 UTC

Hopefully the below will be usefull to allow you to add a feature to the system.

I am going to use my gentoo Distribution as a firewall.  What I wanted to do is
have the gateway on eth1.

In the default scripts to bring up the eth devices in "/etc/init.d/ethx" it does
not allow you to specify which device to add the route to (info taken from

What I propose is that in the "/etc/conf.d/net.ethx" in the gateway section have
another variable "gatewaydev" where you set which device you would like to add
the route too.



Then in the "/etc/init.d/net.ethx" you change the route line to something like

"route add -net default gw $gateway netmask metric 1 __ dev $gatewaydev __"

(Note Underline ( __ ) is my way of making the different part stand out).

Just thought that this would be usefull for anyone else who would like to add
routes on different devices.

Comment 1 Daniel Robbins (RETIRED) gentoo-dev 2002-02-05 10:26:22 UTC
Maybe "gateway="eth1/"" optional syntax?
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2002-02-05 17:23:25 UTC
Fixed on CVS, thanks.