853 B
853 B
+++ date="2022-11-30" author="spanskiduh" title="ufw" description="click to read about ufw" +++
ufw
Connections
sudo ufw status numbered verbose
- check ufw statussudo ufw default deny incoming
- deny incoming connectionssudo ufw default allow outgoing
- enable outgoing connectionssudo ufw allow ssh
- allow certian connection (you can also specify a port number instead of protocol!)sudo ufw deny ssh
- deny certian connectionsudo ufw allow/deny proto tcp from any to any port 80,443
- deny / allow all 80 and 443 connectionssudo ufw allow from 192.168.1.103 to any port 22
- allow incomming ssh connections with specified ip.sudo ufw allow from 192.168.1.1/24 to any port 22
- same thing, but now with specified subnetsudo ufw delete <rule-id>
- delete rule from ufw, get id with status command