SNAT rule settings in iptables rules

A NAT classification


 
 
Two SNAT Scenario Simulation


 
 
Three SNAT configuration rules
Configure the following two steps on the repeater
1. Open the kernel parameters
[root@localhost ~]# sysctl -w net.ipv4.ip_forward=1
[root@localhost ~]# sysctl -a|grep ip_forward
net.ipv4.ip_forward = 1
net.ipv4.ip_forward_use_pmtu = 0
2. Rule configuration
[root@localhost ~]# iptables -t nat -A POSTROUTING -s 10.10.177.0/24 SNAT --to 10.10.188.232
Configure the default route on the client


 
 
Four tests

 


 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326102598&siteId=291194637