some random ip from india is trying to ssh into my ip all day??

I’ve setup fail2ban according to the tutorial but this indian ip kept trying to authenticate in today after it was banned several times to the point where i increased the ban time for anyone trying to connect after 1 failed attempt to max?

What’s the deal though, this is bad for me. If i make one mistake on my password i’m locked out. Is this guy trying to have me?

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


If you’re on a MacBook, I’d recommend Algo as it’ll handle setting up a VPN for you in a matter of just a few minutes – pretty much hassle free.

If you’re not, or if you’d prefer to handle configuring the VPN on your own, there’s a guide here that details how to go about setting up StrongSwan (which is what Algo uses).

Algo will run on Linux and Windows, though my experience with it is limited to OS X / MacOS right now. They do provide instructions on how to set it up on the GitHub page though.

Once a VPN is setup, you’d simply firewall off Port 22 and only allow the static IP of your VPN to connect using:

ufw allow from VPN_IP to any port 22

Where VPN_IP is the IP address of your VPN. Just make sure you’re connected to the VPN when you try to connect :-).

For example, if our VPN IP was, we’d run:

ufw allow from to any port 22

Keep in mind, if you disconnect from the VPN, you won’t be able to login. If you delete the Droplet that your VPN is on, you’ll lock yourself out.

hi @ariziragoran ,

You can do many things to improve your security for example:

  • Setup OpenVPN server and use it to access your droplet using the private IP address and disable SSH on the public IP address.
  • You can use knockd to increase your security using a port koncking sequence to open your firewall just for your IP address.
  • You can change SSH port to a non-standard port.
  • You can try to setup firewall to block access from all IP addresses in India.

Hope any of these help you, contact me if you need help with any of them.