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

I accidentally did:

iptables -t nat -A POSTROUTING -s -j SNAT --to

when should be the server's IP address but I forgot to replace it. How can I undo this?

share|improve this question

1 Answer 1

up vote 7 down vote accepted

Just run:

iptables -t nat -D POSTROUTING -s -j SNAT --to

-D flag remove the rules that are matching the rule specified as parameters. In short, run the same command, but replace -A or -I with -D to remove that rule.

share|improve this answer
thank you for the explanation. – Michelle Sep 29 '12 at 8:25

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.