Welcome to Yumao′s Blog.
Ubuntu命令行下VPN連接與使用
, 2012年08月24日 , , 评论 在〈Ubuntu命令行下VPN連接與使用〉中留言功能已關閉 ,

1.下載pptpclient包
sudo apt-get install pptpclient
2.來看下pptpsetup的幫助
pptpsetup –create –server [–domain ]
–username [–password ]
[–encrypt] [–start]
pptpsetup –delete
Options:
* the name you wish to use to refer to the tunnel (you choose it),
* the IP address or host name of the server,
* the authentication domain name (optional),
* the username you are to use,
* the password you are to use,
* whether encryption is required,
* whether to start the connection after configuration.
pptpsetup – Point-to-Point Tunneling Protocol setup
Copyright (C) 2006 Nelson Ferraz
pptpsetup comes with ABSOLUTELY NO WARRANTY; for details see source.
This is free software, and you are welcome to redistribute it
under certain conditions; see source for details.
3.創建一個tunnel
sudo pptpsetup –create vpn -username USER -password PASS -encrypt -start
4.手工添加一條默認路由
sudo route add default dev ppp0
註:route命令在net-tools包中
5.修改一下/etc/resolve.conf文件
添加如下行:
nameserver 8.8.8.8
nameserver 8.8.4.4
6.以後怎麼辦
以後就可以通過
sudo pon vpn

sudo pppd call vpn
來連接vpn,通過
sudo poff vpn
來斷開vpn了。

关键字:, ,

评论已关闭