Install pptpd on ubuntu server 11.04

Source: Internet
Author: User

Before the pptpd record is installed on ubuntu server 11.04, The centos system is installed on the vps. It is used to ubuntu. The yum of centos is not used to it. Just bite your teeth and change ubuntu first, run the pptpd script on centos, check the main settings, install the corresponding program in ubuntu, and finally sort out the script as follows: 01 #! /Bin/bash02 03IP = public network IP04user = vpn05pass = 'openssl rand 6-base64' 06if ["$1 "! = ""] 07 then pass = $ paifi09 10apt-get purge pptpd ppp11iptables -- flush POSTROUTING -- table nat12iptables -- flush FORWARD13rm-rf/etc/pptpd. conf14rm-rf/etc/ppp15 16apt-get install ppp pptpd17 18 echo "net. ipv4.ip _ forward = 1 ">/etc/sysctl. conf19 www.2cto.com 20sed-I "s/exit 0/# exit 0/g"/etc/rc. local21echo "mknod/dev/ppp c 108 0">/etc/rc. local22echo "iptables-t nat-a postrouting-s 172.16.99.0/24-j SNAT -- to-source $ IP">/etc/rc. local23echo "iptables-a forward-p tcp -- syn-s 172.16.99.0/24-j TCPMSS -- set-mss 1356">/etc/rc. local24echo "exit 0">/etc/rc. local25 26 echo "localip 172.16.99.1">/etc/pptpd. conf27echo "remoteip 172.16.99.2-254">/etc/pptpd. conf28 29 echo "ms-dns 8.8.8.8">/etc/ppp/pptpd-options30echo "ms-dns 8.8.4.4">/etc/ppp/pptpd-options31sed-I "s/require-mppe-128/# require-mppe-128 /g "/etc/ppp/pptpd-options32 33 echo" $ {user} pptpd $ {pass} * ">/etc/ppp/chap-secrets34 35 echo" VPN service is installed, your VPN username is $ {user}, VPN password is $ {pass} "after the script is executed and then restarted, the author can dizzy dows.

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.