Skip to contentSkip to conversation

further than dead gateway detection

LARTC Никита Винокуров 1 participant 1 message Mar 4, 2003

lore
Share & tools
lore
#0 lore raw

-----Original Message-----
From: Paul Evans <[email protected]>
To: [email protected]
Date: Mon, 3 Mar 2003 09:38:17 -0800
Subject: Re: Re[2]: [LARTC] further than dead gateway detection

Quoted 13 lines · Никита Винокуров
Quoted 11 lines
Quoted 2 lines

have you done masquerading from an internal network? cause that does not work for mi..you may help me :)

Yes, I've done it by the means of iptables (I have a 2.4.20 kernel).

masquarade does not interacts with routing, just put it in the two routes:

iptables -t nat -A POSTROUTING -o $IFACE1 -j SNAT --to-source $IP1 ipdables -t nat -A POSTROUTING -o $IFACE2 -j SNAT --to-source $IP2

Quoted 10 lines
Quoted 2 lines

where $IP1 and $IP2 -- the external addresses of the certain interfaces ($IFACE1 and $IFACE2)

I have this which also works:
iptables -t nat -A POSTROUTING -s net/mask -o $IP1 -j MASQUERADE iptables -t nat -A POSTROUTING -s net/mask -o $IP2 -j MASQUERADE

Why would it be better to SNAT?

You may use a MASQUERADE tag only if your ip-addresses are assinged dynamycally. In other cases it would be better to set SNAT.

--
Nikita
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/