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.查看防火墙状态,哪些端口开放了 /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 :…
vi /etc/sysconfig/iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT(允许80端口通过防火墙) 特别提示:很多网友把这条规则添加到防火墙配置的最后一行,导致防火墙启动失败,正确的应该是添加到默认的22端口这条规则的下面 /etc/init.d/iptables restart #最后重启防火墙使配置生效…
vi /etc/sysconfig/iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT(允许80端口通过防火墙) -A INPUT -m state –state NEW -m tcp -p tcp –dport 3306 -j ACCEPT(允许3306端口通过防火墙) 特别提示:很多网友把这两条规则添加到防火墙配置的最后一行,导致防火墙启动失败,正确的应该是添加到默认的22端口这条规则的下面 添加好之…
vi /etc/sysconfig/iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT(同意80端口通过防火墙) -A INPUT -m state –state NEW -m tcp -p tcp –dport 3306 -j ACCEPT(同意3306端口通过防火墙) 特别提示: 非常多网友把这两条规则加入到防火墙配置的最后一行.导致防火墙启动失败,正确的应该是加入到默认的22port这条规…
注意: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 :…
Linux配置防火墙 开启80端口 编辑配置文件/etc/sysconfig/iptables [root@weixinht ~]# vim /etc/sysconfig/iptables 1 # Firewall configuration written by system-config-firewall 2 # Manual customization of this file is not recommended. 3 *filter 4 :INPUT ACCEPT [0:0] 5 :F…