1. 程式人生 > >Centos7搭建pptp VPN一鍵安裝腳本

Centos7搭建pptp VPN一鍵安裝腳本

sdn bsp 長度 登錄 title 無法 att -s 其他

Centos7搭建pptp一鍵安裝腳本

廢話不多說,先上腳本地址:Centos7一鍵pptp

使用:

wget https://raw.githubusercontent.com/DanylZhang/VPS/master/CentOS7-pptp-host1plus.sh
chmod +x ./CentOS7-pptp-host1plus.sh
./CentOS7-pptp-host1plus.sh -u your_username -p your_password
  • 1
  • 2
  • 3

可在-u-p後隨意更改自己的登錄用戶名和密碼。但密碼長度必須大於8個 ASCII字符,否則為了安全,腳本將會隨機生成密碼。

Windows操作系統連接vpn詳細過程截圖:


進入控制面板

技術分享

技術分享

技術分享

技術分享

技術分享

然後更改新建立的vpn連接的設置

技術分享

技術分享

註:

如果你無法訪問一些特定網站,建議你修改ppp接口的MTU(很多時候能連接vpn但是無法打開某些網頁也可能跟這個有關系)

輸入vi /etc/ppp/ip-up

在倒數第二行加入如下內容:/sbin/ifconfig $1 mtu 1400

缺省 MTU:1496

保存後需要重啟PPTP服務器,指令如下: systemctl restart pptpd

也可以不更改ip-up文件,而是在/etc/ppp/下新建ip-up.local文件。指令如下:

cat > /etc/ppp/ip-up.local << END
/sbin/ifconfig $1 mtu 1400
END
chmod +x /etc/ppp/ip-up.local
  • 1
  • 2
  • 3
  • 4

該腳本使用的是後者。

附上其他linux發行版的pptp vpn一鍵安裝腳本的Github地址:pptp一鍵腳本

Centos7搭建pptp VPN一鍵安裝腳本