做咗 cd-rom 成年,今日終於的起心肝註冊個帳號。
先申請 vps
https://virmach.com/compare-vps-plans/
選 ssd256
ubuntu 16-64bit
地點隨意,我選了 Bufaflo,NY
之後結帳,我用 paypal 付了 usd1.25
盡量不要用 credit card, 因為付款是每月 1.25 的, 用 paypal 付第一次款,可以馬上停付以後。
等安裝完成
紀錄 Main IP Address , Root/Admin Password
接下來安裝 l2tp 的軟件
按左面 VNC/Desktop, 新窗口彈出來。
輸入 root
輸入 上面記錄的密碼
要好小心輸入大小寫,不能錯。
順利登入之後
輸入下面一句,然後按 [enter]
wget https://git.io/vpnsetup -O vpnsetup.sh && sh vpnsetup.sh
之後可以去飲杯咖啡,大概3-5分鐘完成。又如下輸出。
## Starting services...
* Restarting authentication failure monitor fail2ban [ OK ]
ipsec start/running, process 13998
Restarting xl2tpd: xl2tpd.
================================================
IPsec VPN server is now ready for use!
Connect to your new VPN with these details:
Server IP: 107.172.90.182
IPsec PSK: W8DShD6ptPG4
Username: vpnuser
Password: wMqfvbMs8Y
Write these down. You'll need them to connect!
Important notes: https://git.io/vpnnotes
Setup VPN clients: https://git.io/vpnclients
IKEv2 guide: https://git.io/ikev2
================================================
紀錄下 Server IP , IPsec PSK , Username , Password 四個資料。
設置已經完成。下一步 設置 手機。
Android 手機內置 l2tp vpn client , 不用安裝app
手機按
setting
connections
more connection settings
vpn
Add VPN profile
Name: 隨意輸入喜歡的名字
Type: 選 L2TP/IPSec PSK
Server Address 輸入上面記錄的IP
L2TP secret 留空
IPSec idenifier 留空
IPsec Pre-shared key 輸入上面的 IPsec PSK, 注意不要在前面或後面加空位。
username 輸入上面 vpnuser
password 輸入上面的 password 要跟大小寫。
之後按 save
按 connect
大公告成。
以上是衝忙中寫出來,給一些不太懂 it 的朋友照著做,一定work ,有錯歡迎指正。