Iptables规则导致HTTP/HTTPS端口放行失效,phpMyAdmin无法访问的问题求助
Iptables规则导致HTTP/HTTPS端口放行失效,phpMyAdmin无法访问的问题求助
各位大佬好,我最近碰到个头疼的问题:只要iptables处于运行状态,我的phpMyAdmin就没法访问了。我试着添加了针对80、443端口的放行规则,但完全没效果,实在摸不着头绪,想请大家帮忙看看问题出在哪!
以下是我当前的iptables规则输出(执行命令 iptables -L -v -n | more 得到的结果):
Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 0 0 REJECT 17 -- * * 0.0.0.0/0 0.0.0.0/0 recent: UPDATE seconds: 60 name: UDP-PORTSCAN side: source mask: 255.255.255.255 reject-with icmp-port-unreachable 0 0 REJECT 6 -- * * 0.0.0.0/0 0.0.0.0/0 recent: UPDATE seconds: 60 name: TCP-PORTSCAN side: source mask: 255.255.255.255 reject-with tcp-reset 4040 2195K ACCEPT 0 -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED 0 0 ACCEPT 6 -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5055 0 0 ACCEPT 0 -- lo * 0.0.0.0/0 0.0.0.0/0 1 646 ACCEPT 17 -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:500 0 0 ACCEPT 17 -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:4500 35 1764 DROP 0 -- * * 0.0.0.0/0 0.0.0.0/0 0 0 ACCEPT 6 -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 0 0 ACCEPT 6 -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443 0 0 REJECT 6 -- * * 0.0.0.0/0 0.0.0.0/0 reject-with tcp-reset 0 0 REJECT 6 -- * * 0.0.0.0/0 0.0.0.0/0 recent: SET name: TCP-PORTSCAN side: source mask: 255.255.255.255 reject-with tcp-reset 0 0 REJECT 17 -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable 0 0 REJECT 17 -- * * 0.0.0.0/0 0.0.0.0/0 recent: SET name: UDP-PORTSCAN side: source mask: 255.255.255.255 reject-with icmp-port-unreachable Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 3652 1884K ACCEPT 0 -- * * 10.10.141.0/24 0.0.0.0/0 policy match dir in pol ipsec proto 50 4808 4752K ACCEPT 0 -- * * 0.0.0.0/0 10.10.141.0/24 policy match dir out pol ipsec proto 50 4 5120 DROP 0 -- * * 0.0.0.0/0 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 6539 packets, 5343K bytes) pkts bytes target prot opt in out source destination
我试过添加这条规则来放行80和443端口,但完全没起作用:iptables -A OUTPUT -p tcp -m multiport --dports 80,443 -m state --state NEW -j ACCEPT
有没有大佬能帮我分析下问题根源?万分感谢!
备注:内容来源于stack exchange,提问作者user1055140
相关产品推荐
相关产品推荐

