iptables -nvL 查看防火墙是否关闭:如下代表防火墙没关闭。
[root@sysconfig]# iptables -nvL
Chain INPUT (policy ACCEPT 33 packets, 6019 bytes)
pkts bytes target prot opt in out source destination
0 0 DROP all -- * * 110.75.0.0/16 0.0.0.0/0
0 0 DROP all -- * * 112.74.182.237 0.0.0.0/0
0 0 DROP tcp -- * * 140.205.225.0/24 0.0.0.0/0 tcp dpt:22
0 0 DROP tcp -- * * 140.205.201.0/24 0.0.0.0/0 tcp dpt:22
0 0 DROP tcp -- * * 95.171.5.83 0.0.0.0/0 tcp dpt:22
0 0 DROP tcp -- * * 140.205.225.197 0.0.0.0/0 tcp dpt:22
0 0 DROP tcp -- * * 190.110.90.50 0.0.0.0/0 tcp dpt:22
0 0 DROP tcp -- * * 90.150.137.33 0.0.0.0/0 tcp dpt:22
8 472 DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:27017
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 28 packets, 6044 bytes)
pkts bytes target prot opt in out source destination
0 0 DROP tcp -- * * 0.0.0.0/0 212.83.177.228 tcp spt:22
0 0 DROP tcp -- * * 0.0.0.0/0 120.27.44.116 tcp spt:22
0 0 DROP tcp -- * * 0.0.0.0/0 212.83.128.41 tcp spt:22
0 0 DROP tcp -- * * 0.0.0.0/0 118.123.119.170 tcp spt:22
0 0 DROP tcp -- * * 0.0.0.0/0 140.205.201.43 tcp spt:22
0 0 DROP tcp -- * * 0.0.0.0/0 123.31.31.249 tcp spt:22
0 0 DROP tcp -- * * 0.0.0.0/0 123.31.34.190 tcp spt:22
0 0 DROP tcp -- * * 0.0.0.0/0 218.244.147.41 tcp spt:22
0 0 DROP tcp -- * * 0.0.0.0/0 212.83.170.203 tcp spt:22
0 0 DROP tcp -- * * 0.0.0.0/0 101.200.158.220 tcp spt:22
0 0 DROP tcp -- * * 0.0.0.0/0 42.96.141.44 tcp spt:22
正常情况如下:
iptables -nvL
[root@ sysconfig]# iptables -nvL
Chain INPUT (policy ACCEPT 1032K packets, 117M bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 1001K packets, 84M bytes)
pkts bytes target prot opt in out source destination