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 accidentally did:

iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to 0.0.0.0

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

share|improve this question
up vote 7 down vote accepted

Just run:

iptables -t nat -D POSTROUTING -s 10.8.0.0/24 -j SNAT --to 0.0.0.0

-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

 
discard

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.