Sign up ×
Server Fault is a question and answer site for 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 -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

1 Answer 1

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

iptables  -t nat -A POSTROUTING -s -j SNAT --to-source XX.XX.XX.XX
share|improve this answer

Your Answer


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.