Page 1 of 1

iptables: "target problem" or "invalid argume

Posted: Mon Aug 02, 2004 12:37 am
by ^rooker
[PROBLEM]
executing some command like this (which should work according to man-pages) gives the error "target problem":

iptables -t nat -I OUTPUT 2 -p tcp --sport 1234 -j DNAT --to 127.0.0.1

or "invalid argument" when using "iptables -t nat -A OUTPUT...".



[SOLUTION]
check if you have activated "CONFIG_IP_NF_NAT_LOCAL" in your kernel settings.

Posted: Mon Feb 28, 2005 4:46 pm
by greuff
You can also get these very descriptive "target problem" errors if you confuse POSTROUTING with PREROUTING in the nat table when you're trying to setup NAT rules (e.g. adding a rule to POSTROUTING when you want to do DNAT or adding a rule to PREROUTING for SNAT respectively)