sudo ufw status numbered
sudo ufw enable
sudo ufw allow mysql
sudo ufw allow ssh
sudo ufw allow 3000
sudo ufw delete 3 deletes the third rule
sudo ufw allow from 192.168.1.100 allows this IP to access all local ports
sudo ufw allow from 192.168.1.132/24 allows all machines on the subnet to access all local ports
----------------------------------------------------------------
ufzt@FZ-magic:~$ sudo ufw status numbered
Status: Active
to action from
- -- --
[ 1] 3306 ALLOW IN Anywhere
[ 2] 22 ALLOW IN Anywhere
[ 3] 22 ALLOW IN Anywhere (v6)
-----------------------------------------------------------------
v6 means that ipv6 can directly sudo ufw delete 3