在ubuntu server 11.04上安裝pptpd的記錄

來源:互聯網
上載者:User

在ubuntu server 11.04上安裝pptpd的記錄 之前vps上裝的是centos系統,用ubuntu用習慣了,centos的yum真心用的不習慣,乾脆一咬牙,換ubuntu 首先,先吧之前centos上裝pptpd的指令碼開啟,檢查一下主要設定,然後用ubuntu的方式安裝相應程式,最後整理指令碼如下: 01#!/bin/bash02 03IP=公網IP04user=vpn05pass=`openssl rand 6 -base64`06if [ "$1" != "" ]07then pass=$108fi09 10apt-get purge pptpd ppp11iptables --flush POSTROUTING --table nat12iptables --flush FORWARD13rm -rf /etc/pptpd.conf14rm -rf /etc/ppp15 16apt-get install ppp pptpd17 18echo "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 26echo "localip 172.16.99.1" >> /etc/pptpd.conf27echo "remoteip 172.16.99.2-254" >> /etc/pptpd.conf28 29echo "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 33echo "${user} pptpd ${pass} *" >> /etc/ppp/chap-secrets34 35echo "VPN service is installed, your VPN username is ${user}, VPN password is ${pass}"執行完指令碼,然後重啟,就可以了   作者 暈dows

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.