Download the http: poptop. sourceforge. netyumstablepackages download from the RPM my CentOS5.564 bit for http: poptop. sourceforge. netyumstablepackagespptpd-1.3.4-2.rhel4.x86_64.rpm to install the rpm-ivhpptpd-1.3.4-2.rhel4.x86_64.rpm1, modify the Master Profile
Download the target RPM from http://poptop.sourceforge.net/yum/stable/packages/
My 64-bit CentOS5.5 download is
Http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.rhel4.x86_64.rpm
Install
Rpm-ivh pptpd-1.3.4-2.rhel4.x86_64.rpm
1. Modify the main configuration file/etc/pptpd. conf. You only need to add the following two lines
Localip 10.0.0.1
Remoteip 10.0.0.100-200
2. Modify the option file/etc/ppp/options.ppt pd. You need to set the dns assigned to the client.
Ms-dns 8.8.4.4
Ms-dns 8.8.8.8
3. Add an account. Add the/etc/ppp/chap-secrets file line by line (* Indicates a dynamic IP address or an IP address)
Youraccount pptpd yourpassword *
4. Start the service
Service pptpd start
5. modify the configuration file/etc/sysctl. conf to make net. ipv4.ip _ forward = 1
Effective immediately
Echo 1>/proc/sys/net/ipv4/ip_forward
6. Set a NAT forwarding route (you can create a file to run manually each time or put it in an automatic running script)
/Sbin/iptables-t nat-a postrouting-s 10.0.0.0/24-o eth0-j SNAT -- to 202.16.12.158
/Sbin/iptables-t nat-a postrouting-o eth0-j MASQUERADE
/Etc/init. d/iptables save
/Etc/init. d/iptables restart
Service pptpd restart
If you find that you can only access QQ and Baidu, but cannot open the webpage, perform the following steps:CommandModify the MTU of the VPN ServerStat-I: Check that the MTU of the PPP0 server is 1396, and the 20 bytes each of the IP addresses and TCP headers are 1356)
/Sbin/iptables-I FORWARD-p tCp-- Syn-I ppp +-j TCPMSS --Set-Mss 1356