On Monday 10 June 2002 3:18 pm, Payal wrote:

> Hi all,
> I used to use ipchains like
> ipchains -A forward -j MASQ
> to share internet connection. Now on Linux kernel 2.4.18 on Mdk 8.2 I want
> to try iptables for a while.
> I just substitued ipchains in the above command with iptables
> iptables -A forward -j MASQ
> iptables v1.2.5: Couldn't load target `MASQ':/lib/iptables/libipt_MASQ.so:
> cannot open shared object file: No such file or directory

You need the appropriate FORWARD rules to allow the traffic through the box 
in the first place, but this is how you masquerade the source address behind 
your Internet link address:

iptables -A POSTROUTING -o $EXT_IF -j MASQUERADE

You might want to read:

http://www.netfilter.org/documentation/HOWTO/packet-filtering-HOWTO.html

http://www.netfilter.org/documentation/HOWTO/NAT-HOWTO.html

 

Antony.

Reply via email to