← 回到文章列表

Ubuntu命令行下VPN连接与使用

1.下载pptpclient包 sudo apt-get install pptpclient 2.来看下pptpsetup的帮助 pptpsetup –create –server [--domain ] –username [--password ] [--encrypt] …

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了。

在这里找找

输入关键词,找一篇过去的记录。