I am trying to execute the following command in iptables (it's the first command I have issued to IPTables since I setup my new VPS, but when I execute the command below:

iptables -A INPUT POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source XX.XX.XX.XX

I get: iptables: No chain/target/match by that name.

From the output I am assuming I would have to create a chain / target beforehand, but how would I do this?

I don't see where I am going wrong :S

link|improve this question
feedback

1 Answer

SNAT belongs to the nat table. By default, iptables acts on the filter table.

iptables  -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source XX.XX.XX.XX
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.