linux下连接vpn

step0. 下载并安装pptp客户端
http://pptpclient.sourceforge.net/

step1.
sudo pptpsetup --create TUNEL --server SERVER --username USERNAME --password PASSWORD --encrypt --start

返回如下信息:
Using interface ppp0
Connect: ppp0 <--> /dev/pts/4
Warning - secret file /etc/ppp/chap-secrets has world and/or group access
Warning - secret file /etc/ppp/chap-secrets has world and/or group access
CHAP authentication succeeded
MPPE 128-bit stateless compression enabled
Cannot determine ethernet address for proxy ARP
local IP address 192.168.2.14
remote IP address 192.168.2.1

step2. 删除以前的默认网关
sudo route del default

step3. 添加路由
sudo route add default gw 192.168.2.1

see also:
- linux下添加路由(http://hi.baidu.com/master365/blog/item/859fef62f542a7d58cb10dc2.html)

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options