linux vpn client 使用

使用方法:

sudo pptpsetup --create tunnelname --server server地址 --username xxx --password xxx --encrypt --start  

连接成功:

Using interface ppp0  
Connect: ppp0 <--> /dev/pts/1  
CHAP authentication succeeded  
MPPE 128-bit stateless compression enabled  
local  IP address 172.20.1.2  
remote IP address 172.20.1.1  

如果报下面的错,就加上--encrypt否则就不加

Using interface ppp0  
Connect: ppp0 <--> /dev/pts/1  
CHAP authentication succeeded  
LCP terminated by peer (MPPE required but peer refused)  
Modem hangup  
Connection terminated.  

然后添加路由route add -net 0.0.0.0 dev ppp0。 使用完毕删除路由route del -net 0.0.0.0 dev ppp0 关闭vpnpoff xxx