1、查看状态
root@DESKTOP-1N42TVH:/home# ufw status ## 开启状态 Status: active
2、关闭防火墙
root@DESKTOP-1N42TVH:/home# ufw disable Firewall stopped and disabled on system startup
root@DESKTOP-1N42TVH:/home# ufw status Status: inactive
3、启用防火墙
root@DESKTOP-1N42TVH:/home# ufw enable ##(有报错??)
root@DESKTOP-1N42TVH:/home# ufw status Status: active