To be a better coder
分类: LINUX
2018-03-22 15:10:29
1. NAT服务
echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -s 10.0.2.0/24 -j SNAT --to 218.222.22.124 |
# 解释
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING --dst 218.222.22.124 -p tcp --dport 80 -j DNAT --to-destination 10.0.0.187:80 |