Fail2ban: Difference between revisions
→Extending Fail2ban: Fix typo |
m →Basic Usage: Add links to module options and ssh page |
||
| (One intermediate revision by one other user not shown) | |||
| 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 == | ||
| Line 109: | Line 116: | ||
[[Category:Applications]] | [[Category:Applications]] | ||
[[Category:Server]] | |||
[[Category:Networking]] | |||