iptables prob
iptables man page says there is option for "--to-destination" for DNAT...
but iptables in my comp doesnt accept it and gives error as: pitables v1.2.7a; Unknown arg '--to-destination'. try iptables -h ...for more informations this has confused me. any suggestions? |
Generally, arguments dependent upon another argument must come after that other argument. For example, in this case, you'd need '-j DNAT' before the '--to-destination'.
|
the cmd i used is:
iptables -t nat -I PREROUTING -p tcp -d 203.78.160.242 --dport 80 -j REDIRECT --to 192.168.0.12 but still it did not occur... |
oops...even cmd :
iptables -t nat -I PREROUTING -p tcp -d 203.78.160.242 --dport 80 -j REDIRECT --to-destination 192.168.0.12 --??? |
You can't use --to-destination with -j REDIRECT. As the man page says, --to-destination is only valid with the 'BALANCE' and 'DNAT' targets. -j REDIRECT redirects to the LOCAL machine only, and as such, is only capable of changing ports.
|
All times are GMT -5. The time now is 11:35 PM. |