Linux NAT转发
- NAT机器
ifconfig enp0s20f0u1i2 192.168.1.1 netmask 255.255.255.0
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j MASQUERADE
- NAT内的机器
ifconfig usb0 192.168.1.2 netmask 255.255.255.0
route add default gw 192.168.1.1