Build pptp service on ubuntu server to implement vpn Server

Source: Internet
Author: User

We know that there are many VPN types, such as the Windows Server series with their own VPN servers, and the installation and configuration are very simple. Today I will introduce the deployment in the log, is a VPN-Server in Linux based on the PPTP protocol. The Ubuntu system is a Debian-based release. The communication community is very active. Because of Debian-based, the Package Manager provided by Debian can handle dependencies well and facilitate software installation.

Install pptp
sudo apt-get install pptpd 
Modify the pptp configuration file. Here, you need to modify the three pptp configuration files:/etc/pptpd. conf.
vim /etc/pptpd.conf
Find localip and remoteip. localip is the IP address of the linux host, and remoteip is the IP address pool, that is, the IP address assigned by the remote computer.
You can configure it as needed. Modify/etc/ppp/pptpd-options
vim /etc/ppp/pptpd-options
Find the ms-dns and configure the dns server. Here I use google's dns. You can add two, and write another line.

Modify/etc/ppp/chap-secrets. This file is used to add a vpn user,
vim /etc/ppp/chap-secrets

Fill in the format of the IP address assigned by the user name (tab) Host Name (tab) and password (tab). The host name can be replaced, if you do not specify the IP address to which the user is allocated, you can change the last IP address to "*" to restart the pptp service.
/etc/init.d/pptpd restart
Wait for a moment. Hey, create a VPN connection from a remote device. Try again.
PS:
If you find that you cannot access the Internet, you need to enable ipv4 forward as follows:
Enable ipv4 forward to modify/etc/sysctl. conf, remove the comment before "net. ipv4.ip _ forward = 1", and then "sudo sysctl-p" to apply the configuration.

OK. Your vpn Server has been set up. Create a vpn connection on your computer!

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.