Centos pptpd (VPN) server installation tutorial

Source: Internet
Author: User
Generally, you only need to add the last two lines, that is, allocate the server IP address and client IP address range. you can select an appropriate IP address.

Usage:

Wget http://jymoz.com/wp-content/uploads/2013/05/pptpd.sh
Sh pptpd. sh

Edit the configuration file vi/etc/pptpd. conf

The following content is required:
Option/etc/ppp/options.ppt pd
Logwtmp
Localip 172.16.36.1
Remoteip 172.16.36.2-254

Generally, you only need to add the last two lines, that is, allocate the server IP address and client IP address range. you can select an appropriate IP address.

Edit the configuration file vi/etc/ppp/options.ppt pd

The following content is required:
Name pptpd
Refuse-pap
Refuse-chap
Refuse-mschap
Require-mschap-v2
Require-mppe-128
Proxyarp
Lock
Nobsdcomp
Novj
Novjccomp
Nologfd
Ms-dns 8.8.8.8
Ms-dns 8.8.4.4
Generally, you only need to set the dns server address of the last two lines, that is, remove the # number and change the IP address to the dns IP address of the server for the client to use.

Edit the configuration file vi/etc/ppp/chap-secrets

# Secrets for authentication using CHAP
# Client server secret IP addresses
(User) pptpd (passwd )*
The four items are respectively the client user name, vpn server name (usually not changed), login password, IP address allocation address (* automatic), separated by spaces or Tab keys
You can join multiple users and enter branches

Enable the ip forwarding function (otherwise, you can only connect to the vpn server and cannot access the external network through the vpn server), modify the configuration file

The contents in vi/etc/sysctl. conf are as follows:
Net. ipv4.ip _ forward = 1
Make the configuration take effect immediately:
/Sbin/sysctl-p

Enable log vi/etc/syslog. conf

Append a row:

Daemon. debug/var/log/pptpd. log

Restart syslog:

Kill-SIGHUP 'cat/var/run/syslogd. Pi'

Set automatic start of pptpd boot:

Chkconfig pptpd on

Start pptpd

Service pptpd start

Some common commands:

Centos:
Start the vpn server
Service pptpd start
Stop the vpn server, but the existing connection is not shadow
Service pptpd stop
Restart the vpn server and disconnect the connected client.
Service pptpd restart-kill
Service pptpd start
View the local dns server address
Cat/etc/resolv. conf
View information of all NICs
Ifconfig-

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.