iptables syntax error

downloaded the iptables v1.2.11 and have got the directory structure in which I have the iptables binary in the source code .I then copy the

binary iptables to another file system and so ./iptables -L .I get the output.But when I do SNAT i get the following :- $./iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 10.0.0.1 iptables v1.2.11: Unknown arg `--to' Try `iptables -h' or 'iptables --help' for more information.

Please help me out .The directory also has binaries iptables-save and iptables-restore .Do I need to copy them too?

I have even tried giving --to-source instead of --to. Does iptables doesnt have support for SNAT ? i did iptables -h and couldnt find any --to or SNAT mention. What might be the problem?

Reply to
jeniffer
Loading thread data ...

Rather odd output. :)

First ensure that you have IP forwarding enabled:

echo "1" > /proc/sys/net/ipv4/ip_forward

Is your eth0 interface static or dynamic? Use snat for static, use masquerade for dynamic ip assignments.

HTH. Thomas

Reply to
Secure Buddha

In article , jeniffer wrote: : downloaded the iptables v1.2.11 and have got the directory structure :in which I have the iptables binary in the source code .I then copy the : :binary iptables to another file system and so ./iptables -L .I get the :output.But when I do SNAT i get the following :- :$./iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 10.0.0.1 : iptables v1.2.11: Unknown arg `--to' : Try `iptables -h' or 'iptables --help' for more information. : :Please help me out .The directory also has binaries iptables-save and :iptables-restore .Do I need to copy them too?

I think you'll find that 'make install' installs a lot more than just the iptables binary. You're missing the whole /lib/iptables tree, which is where libipt_SNAT.so normally resides.

Reply to
Robert Nichols

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.