Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 was dumb enough and just executed:

iptables -A INPUT -j DROP

This blocks everything of course :)

Is there any hope for me to somehow still connect to the server?


share|improve this question
up vote 4 down vote accepted

You might have to either get access to the console, have someone else use console access, or reboot the server, assuming nothing saved your new iptables setting.

share|improve this answer
wow, thanks!!! i thought i ruined it. reboot really worked :) – valk Feb 28 '12 at 17:07
Then remember when you have the rules you want in place you need to save the rules. Look up distro-specific ways to do it...some have scripts to auto-add them for bootup. Others don't. – Bart Silverstrim Feb 28 '12 at 17:15

Use keyboard and screen, serial port, remote KVM, virtual serial port to VM host, or some other such recovery mechanism. Otherwise reboot.

share|improve this answer
reboot really worked :) thanks! – valk Feb 28 '12 at 17:07
how can I accept also your answer together with Bart's? – valk Feb 28 '12 at 17:17
You can only accept one answer. – Kyle Smith Feb 28 '12 at 17:48

Your Answer


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.