Super User is a question and answer site for computer enthusiasts and power users. 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'm using OS X Snow Leopard and typed this cmd into Terminal after reading a blog post that claimed it was a fix for a particular problem I was having, but it has caused other config issues instead. Is there a way to reverse/undo entered commands in Terminal?

This is the code I entered:

iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-ports 10000

Any help appreciated.

share|improve this question

migrated from stackoverflow.com Apr 24 '12 at 3:20

This question came from our site for professional and enthusiast programmers.

1  
You have to learn how to delete a rule from the list. You cannot simply "undo" a command. (and this is not a programming related question). – Felix Apr 23 '12 at 0:12

No, it would be quite too complicated for Terminal to know how to undone every possible command... Despite that some commands can't be undone.

In your case, I think it's something like iptables -t nat -flush or so. But just read the iptables manpage.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .