对 GCE 防火墙规则进行故障排除。这是否意味着 iptables 已关闭?规则看起来空白
Troubleshoot GCE firewall rules. Does this mean iptables is off? The rules look blank
我在其他线程中读到 gce 防火墙规则可能会失败,因为 iptables 仍在实例上 运行。我不管理 iptables。以下是否意味着它没有阻止任何东西?
arian@instance-1:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere multiport dports mdns
ACCEPT tcp -- anywhere anywhere multiport dports 4000
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
这就是完全关闭 GCE 实例上的 iptables 所需要的。
sudo iptables -F
sudo iptables -X
sudo iptables -t nat -F
sudo iptables -t nat -X
sudo iptables -t mangle -F
sudo iptables -t mangle -X
sudo iptables -P INPUT ACCEPT
sudo iptables -P OUTPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
我在其他线程中读到 gce 防火墙规则可能会失败,因为 iptables 仍在实例上 运行。我不管理 iptables。以下是否意味着它没有阻止任何东西?
arian@instance-1:~$ sudo iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT udp -- anywhere anywhere multiport dports mdns ACCEPT tcp -- anywhere anywhere multiport dports 4000 Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
这就是完全关闭 GCE 实例上的 iptables 所需要的。
sudo iptables -F sudo iptables -X sudo iptables -t nat -F sudo iptables -t nat -X sudo iptables -t mangle -F sudo iptables -t mangle -X sudo iptables -P INPUT ACCEPT sudo iptables -P OUTPUT ACCEPT sudo iptables -P FORWARD ACCEPT