码迷,mamicode.com
首页 > 其他好文 > 详细

ubuntu 防火墙

时间:2014-09-26 20:59:28      阅读:137      评论:0      收藏:0      [点我收藏+]

标签:ubuntu   防火墙   关闭防火墙   打开防火墙   

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

ubuntu 防火墙

标签:ubuntu   防火墙   关闭防火墙   打开防火墙   

原文地址:http://blog.csdn.net/lychie/article/details/39566159

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!