Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.