Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 have iptables and masquerading enabled through this:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

How can I revert this rule? i.e I want to disable the masquerade.

I am afraid to test..because if I fail..there would be a lot of problems (for example lose ssh)

Also can I restart iptables hoping that it wouldn't start rejecting all conns.

share|improve this question

Use -D to delete a rule from the selected chain:

iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
share|improve this answer

If you delete a rule, that functionality will be gone.

So any SSH sessions that depend on that rule will also disconnect.

share|improve this answer
wrong, it will affect new connections only in the case of MASQUERADE, and indeed any other rule you had in the nat table. – Olipro Nov 10 '11 at 23:49
@Olipro While we appreciate your efforts, we can't let you dramatically change the meaning of someone's answer like that. You should post that as an Answer yourself. Thank you! – Chris S Nov 26 '12 at 18:11

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.