LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   iptables command returned with an error (https://www.linuxquestions.org/questions/linux-newbie-8/iptables-command-returned-with-an-error-4175486798/)

sahods 12-04-2013 04:40 AM

iptables command returned with an error
 
Hi

While using Enterprise Linux 2.16.0, I keyed in the command

iptables -t nat -A PREROUTING -d 192.168.4.42/32 -j DNAT -to-destination 10.1.4.1
. I received the message - Bad argument '10.1.4.1' try 'iptables -h' or 'iptables --help' for more information.

Any thoughts on why I am having a hard time in trying out the recommendation in http://thewiringcloset.wordpress.com...ble-snat-dnat/

Kind regards

berndbausch 12-04-2013 05:45 AM

Quote:

Originally Posted by sahods (Post 5075147)
Hi

I While using Enterprise Linux 2.16.0, I keyed in the command

iptables -t nat -A PREROUTING -d 192.168.4.42/32 -j DNAT -to-destination 10.1.4.1
. I received the message - Bad argument '10.1.4.1' try 'iptables -h' or 'iptables --help' for more information.

The to-destination parameter requires two hyphens: --to-destination. I haven't tried it out, but could this be the cause of your trouble?

sahods 12-05-2013 09:33 AM

Thanks
 
Many thanks. Your suggestion worked for me.

Quote:

Originally Posted by sahods (Post 5075147)
Hi

While using Enterprise Linux 2.16.0, I keyed in the command

iptables -t nat -A PREROUTING -d 192.168.4.42/32 -j DNAT -to-destination 10.1.4.1
. I received the message - Bad argument '10.1.4.1' try 'iptables -h' or 'iptables --help' for more information.

Any thoughts on why I am having a hard time in trying out the recommendation in http://thewiringcloset.wordpress.com...ble-snat-dnat/

Kind regards



All times are GMT -5. The time now is 05:56 PM.