确认ubuntu 防火墙状态
ufw status verbose
无开启
Status: inactive
有开启
Status: active
启动 (特别注意会立即生效 注意ssh是否有加入允许规则 否则remote将立即与主机失联)
ufw enable
务必确认这个有加上规则再去执行ufw enable
例如:
ufw allow ssh
ufw allow from xx.xx.xx.xx to any port xxxx
查询防火墙状态
ufw status
Status: active
To