Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 7 down vote accepted

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

share|improve this answer
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

 
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.