启用了伪装模式的防火墙。
[root@server ~]# vi /etc/sysconfig/iptables *filter :INPUT DROP [0:0] :FORWARD DROP [0:0] :OUTPUT DROP [0:0] -A INPUT -m state --state INVALID -j DROP -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -p tcp -m tcp --dport 22 --syn -m state --state NEW -j ACCEPT -A INPUT -p tcp -m tcp --dport 80 --syn -m state --state NEW -j ACCEPT -A INPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -s 0.0.0.0/32 -d 255.255.255.255/32 -i wlp2s0 -j ACCEPT -A INPUT -s 172.16.0.0/16 -i wlp2s0 -j ACCEPT -A FORWARD -m state --state INVALID -j DROP -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -p tcp -m tcp --syn -m state --state NEW -j ACCEPT -A FORWARD -p udp -m state --state NEW -j ACCEPT -A FORWARD -p icmp -m icmp --icmp-type 0 -j ACCEPT -A FORWARD -p icmp -m icmp --icmp-type 8 -j ACCEPT -A FORWARD -o lo -j ACCEPT -A FORWARD -s 172.16.0.0/16 -i wlp2s0 -j ACCEPT -A OUTPUT -m state --state INVALID -j DROP -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A OUTPUT -p tcp -m tcp --syn -m state --state NEW -j ACCEPT -A OUTPUT -p udp -m state --state NEW -j ACCEPT -A OUTPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT -A OUTPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT -A OUTPUT -o lo -j ACCEPT -A OUTPUT -d 172.16.0.0/16 -o wlp2s0 -j ACCEPT COMMIT *nat :PREROUTING ACCEPT [0:0] :INPUT ACCEPT [0:0] :OUTPUT ACCEPT [0:0] :POSTROUTING ACCEPT [0:0] -A POSTROUTING -s 172.16.0.0/24 -o enp3s0 -j MASQUERADE COMMIT
本文出自 “老丁的linux” 博客,请务必保留此出处http://laoding.blog.51cto.com/980622/1697708
原文地址:http://laoding.blog.51cto.com/980622/1697708