Run pptpd on CentOS to implement VPN service

Source: Internet
Author: User
Buy a cheap VPS and install the linux system. run pptpd to implement the VPN service and use the famous iptables for nat forwarding. This looks like a professional VPN service. Configure the user name and password to implement a vpn shared by multiple users. the simple steps are as follows: 1 buy vps5.99 $/year https://bandwagonhost.com/aff.php?aff=1018 Buy a cheap VPS and install the linux system. run pptpd to implement the VPN service and use the famous iptables for nat forwarding. This looks like a professional VPN service. Configure the user name and password to implement a vpn shared by multiple users. the simple steps are as follows: 1 buy vps 5.99 $/year https://bandwagonhost.com/aff.php?aff=1018 _________________________________________________ 2 steps for installing centos5 linux _________________________________________________________ 3 install pptpd and follow the steps below wget http://www.diahosting.com/dload/pptpd.sh # Download the installation script sh pptpd. sh # execute this script, the corresponding rpm-ivh ppp-2.4.4-9.0.rhel5.i386.rpm will be automatically downloaded # install ppp, since pptpd depends on this package rpm-ivh pptpd-1.3.4-1.rhel5.1.i386.rpm # install pptpd _________________________________________________________ 4 configure pptpd edit/etc/pptpd. add the following two lines to the conf file: localip 192.168.0.2 # vpn service ipremoteip 192.168.0.234-238 # vpn client ip automatic allocation range editing/etc/ppp/chap-secrets add user abc password 123abc pptpd "123 "* modify DNS server, edit/etc/ppp/options and add the following content: ms-dns 8.8.8.8ms-dns 8.8.4.4 edit/etc/sysctl. conf file. comment out before ipv4.ip _ forward = 1. enable ipv4 forwarding and run the following command to make the configuration modification take effect. sysctl-p restarts pptpd service/etc/init. d/pptpd restart (now pptpd configuration is complete) 5 configure iptables for forwarding, after connecting to the vpn, you can access the Internet and execute the following command: iptables-t nat-a postrouting-s 192.168.0.0/24-j SNAT -- to-source IP, and then execute service iptables save to save it, then restart the service iptables restart. here, the 192 CIDR block is the vpn intranet segment and the IP address is the public IP address of the vps. Note that the iptables is configured as follows because of the openvz architecture, for the zen architecture vps, refer http://www.chenjunlu.com/2012/04/how-to-setup-a-pptp-vpn-server-under-linode-vps/, How to distinguish these two architectures, refer http://lrbnew.blog.163.com/blog/static/3247877201472525341798/ 6. configure the vpn in win7, enter your vps public ip address, pptpd user name and password, and you will be able to use the vpn provided by this vps normally. This article references http://www.chenjunlu.com/2012/04/how-to-setup-a-pptp-vpn-server-under-linode-vps/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.