Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

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.