Ubuntu 和 Windows 配置VPN

來源:互聯網
上載者:User

VPN(Virtual Private Network ,Virtual Private Cloud)指的是在公用網路上建立專用網路的技術。

VPN屬於遠端存取技術,利用公網鏈路架設私人網路,主要採用了隧道技術、加解密技術、密鑰管理技術和使用者與裝置身份認證技術。

方法1:

1)  vpn設定 —> 依次設定 General  —> Gateway, Optional —> User name + Password —> 然後去掉"Availabel to all users"

2)  Advanced —> 勾選"Use Point-to-Point encryption (MPPE)" —> 同時去掉“MSCHAP”,OK

問題癥狀:

ubuntu上 點擊串連vpn,顯示“VPN 服務啟動失敗”

開啟終端, sudo vim  /var/log/syslog  查看系統日誌:
Apr 11 01:27:55 mvc-PC NetworkManager[2652]:VPN plugin state changed: 3
Apr 11 01:27:55 mvc-PC NetworkManager[2652]:VPN connection ‘VPN PA’ (Connect) reply received.
Apr 11 01:27:55 mvc-PC NetworkManager[2652]: VPN connection ‘VPN PA’ failed to connect: ‘No VPN secrets!’.
Apr 11 01:27:55 mvc-PC NetworkManager[2652]: error disconnecting VPN: Could not process the request because no VPN connection was active.
此處提示為:“No VPN secrets!”, ubuntu特別針對網路連接這類的操作制定了一個叫做keyring(密鑰環)的安全性原則,即通過了密鑰環認證方可使用網路。
開啟 系統 —> 喜好設定 —> 密碼和加密金鑰 查看,發現之前設定好了並且能夠正常使用的那個vpn赫然在列,而新設定的沒有相關記錄。

解決方案:

1. 先建立一個vpn,只填寫目標伺服器和使用者名稱,切記一定將“Availabel to all users”前的對勾去掉,其他暫且不動。
嘗試串連一下,會彈出來一個方框讓填入使用者密碼,此時隨意填,填寫真的假的都無妨主要測試用。如果不出意外的話,應該提示“VPN串連失敗”而不是之前的“VPN服務啟動失敗”。
2. 如果是這樣的話,接下來就可以按照vpn供應商的設定協助來改了,勾選“MPPE”,同時去掉“MSCHAP”,但是要保留勾選“MSCHAP2”, 然後去掉"所有使用者可用",設定完成後,建議重啟一下網路管理器。(sudo /etc/init.d/network-manager restart )

3. 如果串連成功,應該會有一個小鎖開始轉,然後提示輸入密碼,輸入正確的密碼後,勾選下面的兩個複選框,方便以後的使用。



方法2:

1) vpn設定 —> ipv4設定 —> “只自動擷取(vpn)地址"

2) dns伺服器,填入 208.67.222.222 或 8.8.8.8 或 8.8.8.4(DNS免費伺服器)

3)設定routs,參考

-------------------------------------------------------------------------------------------------------------

Win7 配置VPN

配置步驟:

1) Control Panel —> Network and Internet —> Network and Sharing Center 

2) Set up a new connection or network  —> Connect to a workspace —> Next —> No, create a new connection —> Use my Internet connection(VPN)

3) Internet address —> 輸入VPN代理IP地址 —> Next —> 輸入 User name + Password —> ok

參考推薦:

ubuntu下設定VPN

Ubuntu VPN Connection for Dummies

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.