我在让 Debian 网络服务器为 HTTP 流量打开端口 80 时遇到了一些麻烦。在我的 iptables 中,我使用以下命令打开了端口 80:
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p udp --dport 80 -j ACCEPT
Run Code Online (Sandbox Code Playgroud)
运行 iptables -L 然后显示以下规则:
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:www
ACCEPT tcp -- anywhere anywhere tcp dpt:www
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Run Code Online (Sandbox Code Playgroud)
然而,在这一切之后,我运行了 nmap -sS 127.0.0.1 并发现端口 80仍然 …