linux下关闭防火墙命令

今天使用linux虚拟机搭建jenkins,但是在虚拟机内部使用浏览器可以访问jenkins主页,在物理机上却无法访问jenkins主页,查找原因后是因为linux虚拟机没有关闭防火墙,关闭防火墙后,问题解决,下面整理下linux下关闭防火墙的命令。

1.命令执行完即可生效,重启后还原。

1 关闭防火墙:service iptables stop
2 开启防火墙:service iptables start

2.永久生效,重启后不会还原

1 关闭防火墙:chkconfig iptables stop
2 开启防火墙:chkconfig iptables start

 

posted @ 2019-02-17 16:17  博小园  阅读(8339)  评论(0编辑  收藏  举报
回到顶部