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
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
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: ---


Attachments

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
Hello,

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
"/etc/conf.d/net.ethx").

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.

eg

****
gatewaydev="eth1"
gateway="192.168.0.1"
****

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

"route add -net default gw $gateway netmask 0.0.0.0 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.

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