Pptpd-install and configure PPTP in Ubuntu

Source: Internet
Author: User
Tags vps
1. ubuntu use apt install pptpd is very convenient, automatically started after installation; $ sudoapt-getinstallpptpd2. modify/etc/pptpd. conf, assign an internal IP address; localip192.168.0.1remoteip192.168.0.234-238,192.168 .0.2453. modify/etc/ppp/chap-secrets to create VPN users and ports

1. It is very convenient to install pptpd using apt in Ubuntu. It is automatically started after installation;
$ Sudo apt-get install pptpd

2. Modify/etc/pptpd. conf and assign an internal IP address;
Localip 192.168.0.1
Remoteip 192.168.0.234-238,192.168 .0.245

3. Modify/etc/ppp/chap-secrets and create a VPN user and password;
Username pptpd password *
NOTE: If * is changed to a fixed internal IP address, the user will be assigned to the fixed address to ensure that the user can create only one VPN connection.

4. Modify/etc/ppp/options and support automatic DNS allocation to prevent DNS hijacking;
Ms-dns 8.8.8.8
Ms-dns 8.8.4.4
Note: Google Open DNS is used above, and other services can be used.

5. Modify/etc/sysctl. conf and support IP forwarding;
Net. ipv4.ip _ forward = 1
Note: Use the following command to take effect:
$ Sudo sysctl-p

6. Modify iptables to support forwarding;
$ Sudo/sbin/iptables-t nat-a postrouting-s 192.168.0.0/24-o eth0-j MASQUERADE
Note: No VPS, not tested.

7. Restart the VPN service;
$ Sudo/etc/init. d/pptpd restart

Experiment results: You can use the user name/password on XP to connect to the VPN Server, and you can connect to the VPN Server; no VPS, so no further test is performed. Next we will try to monitor the traffic of VPN customers.

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.