安装:
apt install ufw
启用和删除:
ufw enable
ufw status numbered
ufw delete (数字)
ufw delete allow 22
ufw delete allow ssh
ufw status verbose
添加规则:
ufw default deny incoming ufw default allow outgoing ufw allow 22 ufw allow ssh ufw allow 1000:2000/tcp ufw allow from 192.168.0.2 ufw allow from 192.168.0.2 to any port 22 ufw allow from 192.168.0.0/24 ufw allow in on eth0 to any port 22