Fail2ban: Difference between revisions
m added Category:Server Category:Networking |
m →Basic Usage: Add links to module options and ssh page |
||
Line 4: | Line 4: | ||
== Basic Usage == | == Basic Usage == | ||
Enable Fail2ban [[NixOS modules|NixOS module]] with the expression: | Enable Fail2ban [[NixOS modules|NixOS module]] with the expression: | ||
< | |||
{{file|/etc/nixos/configuration.nix|nix| | |||
<nowiki> | |||
services.fail2ban.enable = true; | services.fail2ban.enable = true; | ||
</ | </nowiki> | ||
NixOS comes with a pre-configured SSH jail which will observe errors in the SSH daemon and ban offending IPs. If all you need is basic rate-limiting and only have the SSH port exposed, you don't have to setup anything else. | }} | ||
NixOS comes with a pre-configured SSH jail which will observe errors in the [[SSH#OpenSSH Server|SSH daemon]] and ban offending IPs. If all you need is basic rate-limiting and only have the SSH port exposed, you don't have to setup anything else. | |||
For additional configuration options, see the{{nixos:option|services.fail2ban}} module documentation. | |||
== Advanced Usage == | == Advanced Usage == |