There are two of Ali's services, one A has assigned an extranet IP, and the other B does not, how to let B with a to achieve the Internet?
Handled as follows
On Server A
IP tunnel Add i2o mode IPIP remote B local A---here A, B are intranet addresses
Ifconfig i2o 192.168.2.1 netmask 255.255.255.0
On the B server
IP tunnel Add i2o mode Ipip remote a local B---here both A and B are intranet addresses
Ifconfig i2o 192.168.2.2 netmask 255.255.255.0
This completes the IP tunneling between the two servers as well as the virtual NIC i2o creation and IP assignment.
b Settings-Add route forwarding to a service
Route add-net 192.168.1.0/24 GW 192.168.2.1
A setting-a that has an extranet service forwards the request of a private ip192
Iptables-t nat-a postrouting-s 192.168.2.2-d 192.168.1.0/24-j Masquerade
Sed-i '/net.ipv4.ip_forward/s/0/1/'/etc/sysctl.conf
Sysctl-p
Under normal circumstances, you can implement B to access the external network ...
IP tunnel--Realize Ali intranet server can access the extranet ~