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

Re: 2 NIC, 2 Gateway



On Fri, 2002-10-11 at 14:20, david hong wrote:
> 
> what nate said is closest to what i am asking for.
> 
> my network is a bit tricky.
> 
> the linux box eth0 is connecting to internet.
> the eth1 is connecting to one of the VLan.
> 
> what i am trying to achive is to do a portforwarding
> for smtp to a different lan which is not
> the 192.168.0.0 network.

Why not add a route to the other network through the *other* gateway

When you put gw: in your interfaces thats the *default* gateway. That
is, the host to send it to if no route matches. Set it up something like
this.

interface eth0:
210.182.232.22
gw: 210.182.232.1

interface eth1:
192.168.0.12
*no gateway*

then...

route add -net 10.1.14.0 netmask 255.255.255.0 gw 192.168.0.12 dev eth1

That is "route all traffic that is destined for the 10.1.14.* network
out interface eth1 to machine 192.168.0.12"

Change these numbers with your network details.

Make sure you have a route back to your external gateway from the other
network, the default route will most likely suffice.

Kind Regards
Crispin Wellington



Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: