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.

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 has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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

1 Answer 1

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

share|improve this answer