iptables: "target problem" or "invalid argume

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

iptables: "target problem" or "invalid argume

Post 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.
greuff
Absolute Beginner
Posts: 2
Joined: Mon Feb 28, 2005 4:34 pm

Post 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)
Post Reply