I used this command

iptables -A INPUT -p tcp --dport 22 -j DROP

because i was trying to stop port 22 outgoing since i was getting a warnings from amazon and now i cant ssh in....what do i do


SSH runs on port 22. You've just told your firewall to stop all incoming SSH traffic. (I.E your connection).

If you didnt save this anywhere then iptables will not have this rule on reboot. Unless you have physical access or a console you will probably need to restart

  • 1
    If a clean shutdown is initiated, and depending on the distribution settings, the iptables rules may be automatically saved on shutdown/reboot. – slubman May 6 '11 at 4:02

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.