By sreten
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!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.