0

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.

1
  • 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
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.