1.在/etc/sysconfig/iptables里添加
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
2.重启iptables
[root@localhost ~]# /etc/init.d/iptables restart
3.看下状态
[root@localhost ~]# /etc/init.d/iptables status
本文介绍如何通过编辑/etc/sysconfig/iptables文件来配置iptables防火墙以开放8080端口,并提供了重启及查看iptables状态的方法。
1.在/etc/sysconfig/iptables里添加
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
2.重启iptables
[root@localhost ~]# /etc/init.d/iptables restart
3.看下状态
[root@localhost ~]# /etc/init.d/iptables status
3338
1306
3325
3693

被折叠的 条评论
为什么被折叠?