enkil Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 27 Apr 2004 Posts: 115 Location: Bern, Switzerland
|
Posted: Wed Nov 15, 2006 8:23 pm Post subject: Route only traffic from eth2 |
|
|
I hope this question is not too noob'ish, but I'm kinda confused when it comes to iptables.
Here's my network-layout:
eth0: 192.168.32.0/23
eth1: adsl (ppp0)
eth2: 172.16.0.0/24
I want to route traffic from 172.16.0.0/24 through ppp0. I'm kinda cautious with this, because I don't want to route traffic coming from 192.168.32.0/23.
Is it sufficient to do something like this (dunno if the syntax is right in the first place...)
Code: | itpables -t nat -A POSTROUTING -i eth2 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -i eth0 -j DROP |
I'm not sure what to do with the FORWARD-Chain at all... Something like this maybe?
Code: | iptables -A FORWARD -s 192.168.32.0/23 -j DROP |
Thanks for your help... |
|