Amazon Server Setup PPTP method

Source: Internet
Author: User

Amazon Server Setup PPTP method

1 . Open the Amazon Cloud Console and create a free EC2 instance of Ubuntu. During the new process, note that when you select a security group, add a custom TCP rule , Port 1723, and allow access to any location.

2. During the creation of the EC2 process, download a xxxx.pem key file. Open terminal, chmod Xxxx.pem Modify the permissions of the file by command.

3 . Create a new elastic IP in the console, bind to the new instance created in the first step, and ensure that the EC2 does not change the IP at reboot .

4, the terminal through the command sudo ssh–i xxxx.pem [email protected] to remotely connect EC2 server

5. Install the pptpd via the command sudo apt-get install pptpd in the terminal

6, in the terminal input command sudo vim/etc/pptpd.conf to modify the configuration, add two lines at the bottom:

Localip 192.168.9.1

Remoteip 192.168.9.11-30

7, in the terminal input command sudo vim/etc/ppp/pptpd-options to add Google DNS:

Ms-dns 8.8.8.8

Ms-dns 8.8.4.4

8, in the terminal input command sudo vim/etc/ppp/chap-secrets to add user name password, user name password format is as follows: user name + space +*+ space + password +*

9. in the terminal input command sudo vim/etc/sysctl.conf , remove the net.ipv4.ip_forward=1 comment (or add a row)

Execute sudo/sbin/sysctl–p load configuration at Terminal

One, terminal execution sudo iptables–t nat–a postrouting–o eth0–j Masquerade

The terminal executes sudo vim/etc/rc.local before exit 0 plus one line: iptables–t nat–a postrouting–o eth0–j Masquerade

through the sudo/etc/init.d/pptpd restart to open the PPTPD service 14, through services pptpd Status to see if the pptpd service is running, and if it is not running, it can be resolved in the following ways:

1. Open/ETC/INIT.D/PPTPD This file

2. Find the following line
Status_of_proc "$PIDFILE" $DAEMON "$NAME" && Exit 0 | | Exit $?

Add a-p parameter after 3.status_of_proc
Status_of_proc- P "$PIDFILE" $DAEMON "$NAME" && exit 0 | | Exit $?

4. Save the pptpd file and restart the PPTPD service

Amazon Server Setup PPTP method

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.