Take the 2-minute tour ×
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 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

1 Answer 1

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. –  Pineapple Under the Sea 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.