iptables nat 外网nat到内网在只限制外网访问的单一ip地址

166 /etc/init.d/iptables start
167 iptables -I INPUT -s 192.168.10.0/24 -p tcp -j ACCEPT
168 /etc/init.d/iptables save
169 iptables -t nat -A PREROUTING -d 114.112.89.xx -p tcp -j DNAT --to-destination 192.168.10.133
170 iptables -I INPUT -s 106.39.102.171 -p tcp -j ACCEPT
171 /etc/init.d/iptables save
172 /etc/init.d/iptables restart
173 iptables -t nat -nL
174 iptables -nL

猜你喜欢

转载自www.cnblogs.com/gaoyuechen/p/10330215.html
今日推荐