Build pptpdvpn server with CentOS6.t

Source: Internet
Author: User
I bought a linux host and saw on the Internet that my host can be used to build my own vpn server. The key is that I can still roll over the wall. I feel pretty good. I want to build a linux host for fun, my host system is centos6.5. it took me a long time to build a vpn on it. This article mainly describes how to build the pptpd service on centos6.5. 1. run the command to install ppp: yumin

I bought a linux host and saw on the Internet that my host can be used to build my own vpn server. The key is that I can still roll over the wall. I feel pretty good. I want to build a linux host system.Centos6.5 It took me a long time to build a vpn above. This article focuses onCentosBuild the pptpd service on 6.5.

1. install ppp

Run the command: yum install ppp

2. install pptp

32 bit rpm-ivhhttp: // acelnmp.googlecode.com/files/pptpd-1.3.4-1.rhel5.1.i386.rpm
64 bit rpm-ivhhttp: // acelnmp.googlecode.com/files/pptpd-1.3.4-1.rhel5.1.x86_64.rpm

The author's system is 32-bit, so execute the command: rpm-ivhhttp: // acelnmp.googlecode.com/files/pptpd-1.3.4-1.rhel5.1.i386.rpm

The command line window prompts a problem.

Error: Failed dependencies:
Ppp = 2.4.4 is needed by pptpd-1.3.4-1.rhel5.1.i386

It indicates that pptp requires the ppp Version 2.4.4, and I have installed the ppp version 2.4.5, so I decided to uninstall the latest ppp, re-download and install Version 2.4.4, and run the command: yumremove ppp

Download ppp 2.4.4 ftp://ftp.muug.mb.ca/mirror/centos/5.9/ OS /i386/CentOS/ppp-2.4.4-2.el5.i386.rpm

Here to introduce a very good site, http://rpm.pbone.net, I have a lot of rpm packages all under this site. then install the downloaded ppp, execute the command: rpm-ivh ppp-2.4.4-2.el5.i386.rpm, then another problem occurs, the following prompt appears:

Error: Failed dependencies:
Libpcap. so.0.9.4 is needed by ppp-2.4.4-2.el5.i386

This is really tough. it means ppp2.4.4 depends on libpcap. so.0.9.4 and runs the command rpm-qa | greplibpcap. The result is displayed:

Libpcap-1.0.0-6.20091201git117cb5.el6.i686, indicating that the current libcap version is 1.0, and ppp2.4.4 is the need for 0.9. no way to only on the http://rpm.pbone.net this site is to download libpcap. so.0.9.4, and then uninstall the libpcap-1.0.0 version. execute the command:

Wget ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/fedora/linux/core/6/i386/ OS /Fedora/RPMS/libpcap-0.9.4-8.1.i386.rpm

Run the command to uninstall libpcap: rpm-e libpcap. the following error message is displayed:

Error: Failed dependencies:
Libpcap. so.1 is needed by (installed)Tcpdump-14: 4. 0.0-3.20090921gitdf3cb4.2.el6.i686

It indicates that the libpcap package is still dependent on tcpdump. Therefore, you can only uninstall the libpcap package using yum and run the command: yum remove libpcap.

Install libpcap. so.0.9.4 and run the command: rpm-ivh libpcap-0.9.4-8.1.i386.rpm

Install ppp2.4.4, run the command: rpm-ivhppp-2.4.4-2.el5.i386.rpm, finally you can successfully install the ppp, then you can install pptp, re-execute our above command:

Rpm-ivhhttp: // acelnmp.googlecode.com/files/pptpd-1.3.4-1.rhel5.1.i386.rpm

3. configure pptp

Vi/etc/pptpd. conf: # localip 192.168.0.1 # remoteip192.168.0.234-238,192.168 .0.245: localip 192.168.0.1 remoteip192.168.0.234-238,192.168 .0.245 the localip here refers to the virtual ip address of your vpn server, remoteip is the virtual ipvim/etc/ppp/options.ppt pd you used to connect your vpn server to find # ms-dns 10.0.0.1 # ms-dns 10.0.0.2 changed to ms-dns 8.8.8.8 ms-dns 8.8.4.4 add a pptp account: vim/etc/ppp/chap-secrets # Secrets for authentication using CHAP # client server secret IP addresses username pptpd passwd

Edit/etc/sysctl. conf and set # net. ipv4.ip _ forward = 1 to net. ipv4.ip _ forward = 1. Run the command: sysctl-p

Add firewall rules:/sbin/Iptables-T nat-a postrouting-s 192.168.0.0/24-o eth0-j MASQUERADE

4. start pptp and restart firewall

Service pptp start

Servcie iptables restart

I finally got my own vpn server. this is really a tough task!

Related Article

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.