migration to iptables
A message that is not in the archive (sent off-list or not yet received): 200206101942.43007@.
Quoted 9 lines · Payal
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.
Hi,
Thanks for the mails.
iptables -A POSTROUTING -o $EXT_IF -j MASQUERADE
Warning: wierd character in interface -j' (No aliases, :, ! or *). Bad argument MASQUERADE'
Try `iptables -h' or 'iptables --help' for more information.
and this gave,
iptables -A forward -j MASQUERADE
iptables: No chain/target/match by that name
My aim is very simple, I just wanted the equivalent command for ipchains -A forward -j MASQ
in iptables.
Thanks a lot in advance and eagerly waiting for the help. -Payal
Quoted 27 lines · you
Quoted 10 lines · Payal
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 directoryYou 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.
A message that is not in the archive (sent off-list or not yet received): 200206110754.14398@.
Hi
Quoted 5 lines · Payal
Hi,
Thanks for the mails.iptables -A POSTROUTING -o $EXT_IF -j MASQUERADE
Warning: wierd character in interface `-j' (No aliases, :, ! or
Is it possible that EXT_IF is not set? This really looks like EXT_IF="". Try expicitly iptables -A POSTROUTING -o ppp0 -j MASQUERADE (or eth1 or whatever).
But I think it should be iptables -t nat -A POSTROUTING -o ..... -j MASQUERADE.
From info iptables:
MASQUERADE
This target is only valid in the nat table, in the POSTROUTING chain.
Quoted 2 lines
*). Bad argument `MASQUERADE'
Try `iptables -h' or 'iptables --help' for more information.
Same problem. May you should have a look at man iptables.
Quoted 3 lines
and this gave,
iptables -A forward -j MASQUERADE
iptables: No chain/target/match by that name
Correct. MASQUERADE is not valid there.
Quoted 5 lines
My aim is very simple, I just wanted the equivalent command for ipchains -A forward -j MASQ
in iptables.
Thanks a lot in advance and eagerly waiting for the help. -Payal
greetings
Axel