Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: FAIL2BAN  (gelezen 851 keer)

FAIL2BAN
« Gepost op: 2024/06/12, 23:24:51 »
Is FAIL2BAN alleen bedoeld voor servers of is het ook verstandig om op je thuiscomputer te installeren?
Asus Vivobook Ryzen7   Debian 12 Gnome.


Haastige spoed is alleen maar goed om vlooien te vangen.

Offline bart85

  • Lid
Re: FAIL2BAN
« Reactie #1 Gepost op: 2024/06/13, 09:07:01 »
https://www.digitalocean.com/community/tutorials/how-to-protect-ssh-with-fail2ban-on-ubuntu-20-04

Citaat
SSH is the de facto method of connecting to a cloud server. It is durable, and it is extensible — as new encryption standards are developed, they can be used to generate new SSH keys, ensuring that the core protocol remains secure. However, no protocol or software stack is totally foolproof, and SSH being so widely deployed across the internet means that it represents a very predictable attack surface or attack vector through which people can try to gain access.

Any service that is exposed to the network is a potential target in this way. If you review the logs for your SSH service running on any widely trafficked server, you will often see repeated, systematic login attempts that represent brute force attacks by users and bots alike. Although you can make some optimizations to your SSH service to reduce the chance of these attacks succeeding to near-zero, such as disabling password authentication in favor of SSH keys, they can still pose a minor, ongoing liability.

Large-scale production deployments for whom this liability is completely unacceptable will usually implement a VPN such as WireGuard in front of their SSH service, so that it is impossible to connect directly to the default SSH port 22 from the outside internet without additional software abstraction or gateways. These VPN solutions are widely trusted, but will add complexity, and can break some automations or other small software hooks.

Prior to or in addition to committing to a full VPN setup, you can implement a tool called Fail2ban. Fail2ban can significantly mitigate brute force attacks by creating rules that automatically alter your firewall configuration to ban specific IPs after a certain number of unsuccessful login attempts. This will allow your server to harden itself against these access attempts without intervention from you.

In this guide, you’ll see how to install and use Fail2ban on a Ubuntu 20.04 server.

Enkel als je ervice hebt draaien zoals SSH voor inloggen. Voor een cliënt heeft het geen nut.
Je leert maar mooi over weg gaan met de commandline.
Linus: "I'm happy with the people who are wandering around looking at the stars but I am looking at the ground and I want to fix the pothole before I fall in."
I look to the clouds behind me and see the thunder coming.

Re: FAIL2BAN
« Reactie #2 Gepost op: 2024/06/13, 10:34:33 »
Bedankt voor je uitgebreide antwoord. Ik heb geen server draaien dus heb ik het niet nodig, stel dat ik mijn NAS via internet  voor mijzelf beschikbaar zou maken , kan het dan handig zijn, of is dat ook overbodig?
Asus Vivobook Ryzen7   Debian 12 Gnome.


Haastige spoed is alleen maar goed om vlooien te vangen.

Offline Bloom

  • Lid
Re: FAIL2BAN
« Reactie #3 Gepost op: 2024/06/13, 19:48:38 »
Voor alles wat bereikbaar is vanaf het internet, moet je ervan uitgaan dat het een doel voor hackers is. Dus zet niets anders dan een Linux of Unix systeem online en zorg dat de kernelparameters voor het blokkeren van DDoS-aanvallen aangezet zijn (standaard staan die uit omdat ze een impact hebben op de netwerkprestaties) en dat ssh-inlog onmogelijk is of via authenticatiesleutels werkt. En ja, fail2ban installeren en gebruiken is altijd de moeite voor eender welke inlog die je online hebt staan.

Re: FAIL2BAN
« Reactie #4 Gepost op: 2024/06/14, 11:25:00 »
Zover ik weet heb ik geen inlog online staan op dit moment. maar mogelijk wil ik het gebruiken als ik mijn nas vanaf internet wil benaderen.
Asus Vivobook Ryzen7   Debian 12 Gnome.


Haastige spoed is alleen maar goed om vlooien te vangen.