Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> 關於 Linux

CentOS 一鍵安裝 PPTP VPN 服務腳本與 OpenVZ 環境注意事項

編輯:關於 Linux

PPTP VPN 成本低、部署快,適合企業遠程接入。本文介紹 CentOS 下一鍵安裝腳本使用方法,並針對 OpenVZ 虛擬化環境給出關鍵檢查項目。

安裝步驟

  1. 下載腳本:
    wget https://d.xker.com/2014/pptpd.sh
    # 備選:https://www.zrblog.net/sh/pptpd.sh
  2. 執行安裝:
    sh pptpd.sh
    腳本自動完成所有配置,安裝結束會顯示預設用戶名密碼,請妥善保存。

OpenVZ 環境前置檢查

執行安裝前必須確認 VPS 支援 TUN/TAP 與 PPP 模組:

cat /dev/net/tun
# 返回 "File descriptor in bad state" 表示正常

cat /dev/ppp
# 返回 "No such device or address" 表示正常

常見問題後續調整

  • 編輯 /etc/ppp/chap-secrets 新增用戶 (格式同預設)。
  • 若連線失敗,嘗試去加密:編輯 /etc/ppp/options.pptpd 註釋 require-mppe-128,客戶端設定「可選加密」。
  • 重啟服務:/etc/init.d/pptpd restart
  • 若安裝報錯找不到 /etc/ppp,嘗試關閉 yum fastestmirror 插件:編輯 /etc/yum/pluginconf.d/fastestmirror.conf 設 enabled=0。

此方法僅適用 CentOS,其他發行版可參考原理調整。

Copyright © Windows教程網 All Rights Reserved