Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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