Automated firewalling using fail2ban

I noticed that i had quite a number of connections to my ssh port on my piaware machine, including attempts to login with the user pi.

So i have setup fail2ban to take care of this a now things are more quiet in my logs. Besides ssh i also activated modules for other services i have on my machine.

I wrote a post about fail2ban so take a look if you need this for your server!

https://www.phenixops.net/index.php/Fail2ban

2 Likes

You could use something like Zerotier and enable SSH for this IP only. Then nobody would know about the existence of port 22 (or whatever you’ve set up for SSH

Have this running since a couple of weeks now and it is pretty silent on my devices

1 Like

This is an useful tool indeed. I don’t expose SSH to internet, but I do expose a web server for my ADS-B page.
I am using ZeroTier for years now too.

1 Like

@foxhunter suggested Zerotier, I installed it on my Pi, Mobile Phone and MAcbook. It works like a charm.
Using ssh as well.

Give it a try

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.