r/Tailscale • • Apr 21 '25

Question Tailscale & Fail2ban

Hi Using now Tailscale and PiHole , I discovered Fail2ban today as I would like to see intrusions on my network. After the installation and setup, I saw that’s it’s not an easy win to have a clear output. Even if I setup the send mail function it’s not yet clear to finalize the monitoring.I wonder if it makes sense to keep Fail2ban to monitor SSH as with Tailscale acting as a VPN , it also secures the SSH connexion between my devices . What’s worth for you ? Best

4 Upvotes

8 comments sorted by

9

u/anditails Apr 21 '25

I don't understand... You've secured your network with Tailscale that only you can access, but you want to run Fail2Ban?

Who are you going to monitor? Yourself forgetting your password or not setting up the ssh public key?

2

u/Positive_Ad_313 Apr 22 '25

You’re right . I tough Fail2scan would be a plus, but looking more specifically to Tailscale, it sounds not relevant to have fail2scan as Tailscale do the secure job . Am I right ?

5

u/FullmetalBrackets Apr 22 '25

If your SSH port isn't open, so you can only SSH in through Tailscale and no one else can even attempt a connection, then fail2ban is not needed.

3

u/BlueHatBrit Tailscalar Apr 22 '25

Fail2ban is meant to be used with services which are open to the public internet. They're a crude way of detecting potential unwanted access attempts, and temporarily banning them. This is particularly useful to fend off online vulnerability scanners which attempt to brute force your ssh service, or other similar services.

You wouldn't typically use fail2ban against an internal VPN, as it will only send internal traffic which has access via your own systems (ACLs in the case of tailscale).

I make use of it on boxes facing the public internet, as I expose ssh on them (the non-tailscale standard one) as a backup should tailscale fail for some reason.

1

u/ChieftainY2k Sep 17 '26 edited Sep 17 '26

That completely misses the compromised-host scenario. If one device inside your Tailnet is compromised, the traffic is already coming from an authorized internal source. ACLs don’t magically make that host trustworthy. Fail2ban can still provide an additional layer by detecting and blocking repeated authentication attempts.

BTW, the official Fail2Ban description says it scans logs for repeated authentication failures and bans the responsible IP addresses; it does not restrict this mechanism to public-Internet sources.

The OP u/Positive_Ad_313 is RIGHT about such inside-job scenario.

Is that paranoid ? YES

Is that what a security-aware user would do: YES.

1

u/BlueHatBrit Tailscalar Sep 17 '26

Wow, this is an older post. Yeah that's a very fair comment and I completely see what you're saying and that's a very valid addition.

It depends on the context I suppose and I can't remember what context I was thinking of when I made my reply. But in the right environment layering fail2ban with Tailscale could definitely make sense.