安装自带ppp / libpcap
安装pptp http://pptpclient.sourceforge.net/
命令行配置:
pptpsetup –create vpntovps –server vpn.zhangjianfeng.com –username jeffrey –password 123456 –encrypt
cat /etc/ppp/peers/vpntovps
pty “pptp vpn.zhangjianfeng.com –nolaunchpppd”
lock
noauth
nobsdcomp
nodeflate
name jeffrey
remotename vpntovps
ipparam vpntovps
require-mppe-128
cat /etc/ppp/chap-secrets
# added by pptpsetup for vpntovps
jeffrey vpntovps “123456” *
cp /usr/share/doc/ppp-2.4.4/scripts/poff /usr/sbin/
cp /usr/share/doc/ppp-2.4.4/scripts/pon /usr/sbin/
chmod +x /usr/sbin/pon /usr/sbin/poff
pon vpntovps #连接
poff #断开VPN
route add -net 0.0.0.0 dev ppp0 #添加路由