Mac系统推荐使用以下协议:
IPSec or L2TP: 配置简单。
SSH Socks Tunnel: 稳定,只限网页访问。
接口: VPN
VPN类型: 'Cisco IPSec' (Recommended) or 'L2TP over IPSec'
服务器地址: sanpingshui.com
帐户名称: [Your account or guest account]
密码: [Your password or guest password]
共享的密钥(Shared Secret): petersvpn
组别名称(Group Name): <空> (Empty)
其它: 默认
注意:L2TP必须在高级选项里勾选"通过VPN连接发送所有通信"。
SERVER_IP: sanpingshui.com
SSH USER: vpn
SSH key file: [your key file], e.g. this file vpn.pem
Open
Terminal(终端) in Mac,
and type the following command to setup the SSH tunnel:
ssh -D 9090 [USER]@[SERVER_IP] -i [Path of your SSH key file]
eg:
ssh -D 9090 vpn@sanpingshui.com -i /home/david/vpn.pem
or if you run the command in the folder containing the SSH key file:
ssh -D 9090 vpn@sanpingshui.com -i ./vpn.pem
If the ssh command is successful, you will see a welcome message like below.
...
*** Welcome! You can configure your browser to use Socks Tunnel now. ***
vpn@ip-172-26-1-210:~$
If you face any permission issue with the SSH key file while running the above command,
run the command below:
chmod 600 [Path of your SSH key file]
请参考 这里。注意配置中端口是上面的9090。
下载Firefox火狐,打开设置->网络设置,选择手工配置代理如下: