为了允许从端口 8443 的输入,我输入了 iptables 规则:
-A INPUT -i eth0 -p tcp --dport 8443 -j ACCEPT
但是,当我输入:
$ netstat -a
没有提到 https 或 8443。结果是:
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:6311 *:* LISTEN
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 gauss:ssh ommited ESTABLISHED
tcp 0 0 gauss:ssh omitted ESTABLISHED
tcp 0 0 localhost:6311 localhost:48872 ESTABLISHED
tcp6 0 0 localhost:8005 [::]:* LISTEN
tcp6 0 0 [::]:8009 [::]:* LISTEN
tcp6 0 0 [::]:www [::]:* LISTEN
tcp6 0 0 [::]:ssh [::]:* LISTEN
tcp6 0 0 localhost:48872 localhost:6311 ESTABLISHED
udp 0 0 *:mdns *:*
udp 0 0 *:52703 *:*
udp6 0 0 [::]:42168 [::]:*
udp6 0 0 [::]:mdns [::]:*
如何才能成功开放8443端口?
谢谢
答案1
iptables 只会允许端口进入,它不会“打开”端口!
如果你想检查 iptables 允许哪些端口,你应该iptables -L -nv