Report this

What is the reason for this report?

Can't login to droplet after iptables command

Posted on May 26, 2015

After seeing multiple fail attempts to login using SSH from intruder I found this solution on http://unix.stackexchange.com. After second command console tab freezed and connection to droplet was droped.

iptables -A INPUT -p tcp --dport 22 -m recent --update --seconds 60 --hitcount 4 --name SSH --rsource -j DROP iptables -A INPUT -p tcp --dport 22 -m recent --set --name SSH --rsource -j ACCEPT

Now I have the problem to login to my droplet via SSH and I’m getting these messages.

OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007 debug1: Reading configuration data /c/Users/Milan/.ssh/config debug1: Connecting to <droplet-ip> [<droplet-ip>] port 22. debug1: connect to address <droplet-ip> port 22: Attempt to connect timed out without establishing a connection ssh: connect to host <droplet-ip> port 22: Bad file number

Does someone knows how to fix that?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Now I have new problem. I cant type anything to console or it freezes. Even see some weird escape characters. Basicly cant type any command in it. Tried Chrome and Firefox Portable on Win7 x64.

Use the console and flush your iptables. And in the future, don’t copy/paste random iptable rules. Use csf/lfd.

This comment has been deleted

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.