Step 1. Set pptpd VPN for CentOS. install the ppp service and related components yum install-y ppp iptables 2. download the latest pptpd rpm package (pptpd latest installation package address) wget-c http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.rhel5.i386.rpm wget http://files.doylenet.net/linux/yum/centos/5/i386/doylenet/pptpd-1.3.4-1.i386.rpm (if the above cannot be found, use this connection) 3. install the downloaded rpm package rpm-ivh pptpd-1.3.4-2.rhel5.i386.rpm 4. set the dns used for pptpd resolution (remove the # number before the ms-dns, # number indicates the comment, and fill in the opendns server address) vi/etc/ppp /Options.ppt GBE-dns 208.67.222.222ms-dns 208.67.220.220 5. set the user name, dialing method, user password, and source ip address used for dial-up. (You can set the user name and password as needed. You can only enter pptpd for the dial-up method. If the source ip address is set to *, no limit is set) vi/etc/ppp/chap-secretsmyusername pptpd mypassword * 6. set the local ip address and the remote ip address (the local ip address is allocated to you after dialing, and the remote ip address is allocated to the server) vi/etc/pptpd. conflocalip 192.168.9.1remoteip 192.168.9.11-30 7. set the ip Forwarding status to take effect, and then load immediately (related to NAT forwarding in step 1) vi/etc/sysctl. confnet. ipv4.ip _ forward = 1/sbin/sysctl-p 8. start the pptpd service and set Start/sbin/service pptpd startchkconfig pptpd on 9. start iptables rules, set NAT forwarding, and save the settings (iptables itself is started upon startup, and chkconfig iptables on is no longer required) /sbin/service iptables start/sbin/iptables-t nat-a postrouting-o eth0-s 192.168.9.0/24-j MASQUERADEservice iptables save 10. set up vpn dialing in a local connection under windows, and enter the user name and password to connect.