NAT mode as egress gateway
1. Physical topology
2. Host Nic settings
Echo "1" > > / proc/sys/net/ipv4/ip_forward # enable routing forwarding
3. Client network configuration
# set the client ip to 10. Segment and the gateway points to 10.1.1.1
# ping Gateway Test
4. Setting the host NAT rule iptables- t nat-A POSTROUTING-s 10.1.1.1ax 24-j SNAT-- to-source 192.168.0." indicates that a message with the original address of 10.1.1.1Universe 24 network segment has been received and forwarded to 192.168.0.9IP and forwarded to iptables- t nat-nL # View nat rule iptables-save > / etc/sysconfig/iptables # Save rules, this folder will read this rule when the folder system restarts So as to automatically load iptables-restore