Install the VPN service under Centos6

Source: Internet
Author: User
Html code $ cd/usr/local/src $ wgethttp: // Configure
Centos6 install VPN service under the Html code $ cd/usr/local/src $ wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.el6.x86_64.rpm www.2cto.com $ rpm-Uhv pptpd-1.3.4-2.el6.x86_64.rpm using the software is http://poptop.sourceforge.net/dox/reference chapter is the original http://blog.secaserver.com/2011/10/install-vpn-pptp-server-centos-6/ written very clearly, but you need to move this website to the ladder, you know. So I translated it. Java code OS: CentOS 6 32bit VPN server: 192.168.18.1 VPN client IP: 192.168.18.2-192.168.18.30 VPN username: flashing Password: wodemima 1. install ppp $ yum install ppp-y www.2cto.com 2. download and install pptpd (the daemon for point-to-point tunneling ). http://poptop.sourceforge.net/yum/stable/packages/ this URL is available for all packages. Note that if there is no error, debian apt can directly install pptpd, so there is no debian package.
Java code $ cd/usr/local/src $ wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.el6.x86_64.rpm $ Rpm-Uhv pptpd-1.3.4-2.el6.x86_64.rpm 32-bit Download wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.el6.i686.rpm I didn't even have wget in the newly installed system. I had to install wget in yum first ,?? /Div> 3. modify/etc/pptpd. conf www.2cto.com localip 192.168.18.1remoteip 192.168.18.2-30localip is the ip address of the ppp virtual intranet gateway, and remoteip is the ip address segment. for example, 2-30 allows 192.168.18.2-192.168.18.30, after I dial up, the IP address allocated for the vpn connection is 192.168.18.30 4. modify/etc/ppp/options.ppt pdrequire-mschap-v2require-mppe-128ms-dns 8.8.8.8 this is nothing to change, mainly add dns address 5. modify/etc/ppp/chap-secrets. the username and password format are as follows: [username] [space] [server] [space] [password] [space] [IP addresses] flashing pptpd woshimima * www.2cto.com 6. modify/etc/sysctl. the following sections of conf are the parts where the iptables package forwards the net. ipv4.ip _ forward = 1 7. make change 6 Take Effect $ sysctl-p 8. open the nat $ iptables-t nat-a postrouting-o eth0-j MASQUERADE $ service iptables save $ service iptables restart
Edit/etc/sysconfig/iptables. Note the following two points: a adds A line-a input-p tcp-m state -- state NEW-m tcp -- dport 1723-j ACCEPT because the default vpn is access B of port 1723 #-a FORWARD-j REJECT -- reject-with icmp-host-prohibited must be commented out, you can also change the ip address range 192.168.18 to forward. Otherwise, you cannot access the Internet through the vpn. 9. pptpd is made into a service, and then restarted, over. $ chkconfig pptpd on $ init 6 www.2cto.com 10. finally, create a vpn connection for windows or clients and fill in the user name and password you just entered.

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.