mirror of
https://github.com/mikaela/mikaela.github.io/
synced 2024-11-23 04:29:31 +01:00
ufw: use sshguard for protecting sshd
This commit is contained in:
parent
57b2207047
commit
4bc4087d2b
@ -17,7 +17,7 @@ network and with IPv6 your devices have public IPv6 addresses.
|
||||
This post first has list of commands, then explanations.
|
||||
|
||||
```
|
||||
ufw limit 22/tcp
|
||||
ufw allow 22/tcp
|
||||
ufw default deny incoming
|
||||
ufw default allow outgoing
|
||||
systemctl enable ufw && systemctl start ufw
|
||||
@ -31,9 +31,9 @@ ufw allow from 172.16.0.0/16 to any port 17500 proto tcp
|
||||
ufw allow 60000:61000/udp
|
||||
```
|
||||
|
||||
* 22 TCP/ssh — Prevent more than 6 connections in 30 seconds to the SSH
|
||||
port and it's the first command as you don't want to lock yourself out
|
||||
of it.
|
||||
* 22 TCP/ssh — Allow acces to SSHdm you don't want to lock yourself out.
|
||||
* previously I used `ufw limit` but it seems to be too oversensitive,
|
||||
just use SSHGuard.
|
||||
* Deny incoming connections unless the port has been whitelisted.
|
||||
* Allow all outgoing connections, keeping list of authorized ports would
|
||||
be too much for me.
|
||||
|
Loading…
Reference in New Issue
Block a user