首页 > Linux操作系统 > Linux操作系统 > Linux中关闭防火墙
即时生效,重启后失效
开启: service iptables start
关闭: service iptables stop
重启后生效
开启: chkconfig iptables on
关闭: chkconfig iptables off
在开启了防火墙时,做如下设置,开启相关端口
修改/etc/sysconfig/iptables 文件,添加以下内容:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 23 -j ACCEPT
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28869493/viewspace-1094225/ ,如需转载,请注明出处,否则将追究法律责任。