CentOS5 configure VPNPPTP Service

Source: Internet
Author: User
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

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.