Article Title: in Linux, pptp performs nat to connect to another network persistently. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Since the PPTP protocol has some minor problems when it passes through the NAT protocol, it is impossible for multiple clients to dial a vpn server at the same time under the nat, so I thought of this method, dialed a link, and then performed nat
Install pptp and pptpconfig respectively
Rpm-ivh http://pptpclient.sourceforge.net/yum/stable/rhel5/i386/pptp-release-4-2.rhel5.noarch.rpm
Yum -- enablerepo = pptp-stable install pptpconfig
Establish dialing
Pptpsetup -- create myvpn -- server 202.96.69.40 -- username myvpnuser -- password mypasswd -- encrypt -- start
Route entry added to the VPN Network
Route add-net 192.168.0.0/24 gw 192.168.0.206
Enable IP Forwarding
Sysctl-w net. ipv4.ip _ forward = 1
Enable NAT
Iptables-t nat-a postrouting-o ppp0-j MASQUERADE
In this way, the company's network and remote private network are directly connected together. You can make a policy on the firewall to only allow specific clients to pass through.