Skip to contentSkip to conversation

masquerade over multiple gw

DISCUSSION Esteban Ribicic 2 participants 2 messages Feb 23, 2003 – Feb 26, 2003

lore
Share & tools
lore
#0 lore raw

hi,
im trying to masquerade my internal network to internet over two gw. it seems imposible to specify more than one -o interface right? now im using this:
iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE
but i still have ppp0 wich also is conected to the internet.. any idea?
thanks

#1 lore raw
Quoted 6 lines · Esteban Ribicic

im trying to masquerade my internal network to internet over two gw. it seems imposible to specify more than one -o interface right? now im using this:
iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE
but i still have ppp0 wich also is conected to the internet.. any idea?

Juste add a second rule...

iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

Then, packets routed through ppp0 will be masqueraded.

Signature · 4 lines
Cédric Blancher  <[email protected]>
IT systems and networks security expert  - Cartel Sécurité
Phone : +33 (0)1 44 06 97 87 - Fax: +33 (0)1 44 06 97 99
PGP KeyID:157E98EE  FingerPrint:FA62226DA9E72FA8AECAA240008B480E157E98EE