1.查看防火墙状态,哪些端口开放了 /etc/init.d/iptables status 2.配置防火墙 vi /etc/sysconfig/iptables ###################################### # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filter :INPUT…
重启后生效方法: 1.开启: chkconfig iptables on 2.关闭: chkconfig iptables off 即时生效,重启后失效 : 1.开启: service iptables start 2.关闭: service iptables stop 在开启了防火墙时,做如下设置,可以有选择性地开启相关端口: 需要修改/etc/sysconfig/iptables 文件,添加以下内容来开放端口访问: -A INPUT -m state --state NEW -m tcp…
注意:Ubuntu/Debian无法使用此方法 1.打开iptables vi /etc/sysconfig/iptables 2.添加防火墙规则 规则参考:http://www.cnblogs.com/EasonJim/p/6847874.html # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filter :…