ubuntu 防火墙
来源:程序员人生 发布时间:2014-10-03 08:00:00 阅读次数:3570次
sudo ufw status查看防火墙状态
lychie@ubuntu:/$ sudo ufw status
Status: active
sudo ufw disable关闭防火墙
lychie@ubuntu:/$ sudo ufw disable
Firewall stopped and disabled on system startup
lychie@ubuntu:/$ sudo ufw status
Status: inactive
sudo ufw enable启动防火墙
lychie@ubuntu:/$ sudo ufw enable
Firewall is active and enabled on system startup
lychie@ubuntu:/$ sudo ufw status
Status: active
sudo ufw allow 端口打开某个端口
lychie@ubuntu:/$ sudo ufw allow 22
Rule added
Rule added (v6)
lychie@ubuntu:/$ sudo ufw status
Status: active
To Action From
-- ------ ----
22 ALLOW Anywhere
22 (v6) ALLOW Anywhere (v6)
sudo ufw delete allow 端口关闭某个端口
lychie@ubuntu:/$ sudo ufw delete allow 22
Rule deleted
Rule deleted (v6)
lychie@ubuntu:/$ sudo ufw status
Status: active
生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠