ubuntu中查看防火墙状态、关闭、开启防火墙

 

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

 

posted @ 2022-04-27 13:05  小鲨鱼2018  阅读(2413)  评论(0编辑  收藏  举报