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

Possible Duplicate:
IPTables: No chain/target/match by that name

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

share|improve this question

migrated from stackoverflow.com Apr 23 '11 at 22:46

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Iain, Ward, mailq, Scott Pack, MDMarra Nov 17 '11 at 1:29

This question was marked as an exact duplicate of an existing question.

    
This will be more suitable in ServerFault, Unix&Linux, or SuperUser. Flagged for migration. – pepoluan Apr 23 '11 at 2:02

You cannot append to both INPUT and POSTROUTING; you will need to generate a rule per chain.

share|improve this answer