Setup VPN connection (Microsoft PPTP) for Ubuntu 12.04
来源:互联网 发布:c语言swich case 编辑:程序博客网 时间:2024/04/29 08:44
Setting up VPN client (PPTP) to connect to some VPN server should be a fairly easy task nowadays - at least most of the online articles/tutorials/videos all suggest so. For example,https://www.youtube.com/watch?v=YUgSpKFhuqg, andhttp://ashu-geek.blogspot.co.uk/2012/05/vpn-virtual-private-network.html.
It is in fact very simple --- well, at least for Windows and Mac OS, least 5 minutes for both OSs. However for Ubuntu (not sure for other Linux variants), it's pain-in-the-ass business!!
Basically, the NetworkManager was disabled on all machines in the lab since network setup is handled in the old-fashion way of making use of /etc/network/interfaces file. Most tutorial are based on a working state of NetworkManager.
One solution is to put NetworkManager back into the control
https://answers.launchpad.net/ubuntu/+source/gnome-nettool/+question/204377
which didn't work for my case.
*************************************************************************
*************************************************************************
wired device not managed
Most probably your interface appears in /etc/network/
interfaces that appear in /etc/network/
To do this - in a terminal:
sudo nano /etc/NetworkMan
change the line managed=
Save, stop and start network manager:
sudo service network-manager restart
Alternatively, you can remove the interface from /etc/network/
backup the current interfaces file:
sudo cp /etc/network/
Then open the file:
sudo nano /etc/network/
Delete everything in that file and copy and paste the following:
auto lo
iface lo inet loopback
Save, stop and start network manager:
sudo service network-manager restart
*************************************************************************
*************************************************************************
There is of course nice step-by-step instructions on how to configure VPN connection manually.
The above link also explains the sort of 'conflicts' between /etc/network/interfaces and NetworkManager.
Anyway, it took our network guru the whole morning to get the manual configuration working, although I have no idea how did he fix it.
The only extra bit I can figure is that the error seemed to be "FATAL: Module ppp_mppe not found" and he seemed to have done 'modprobe ppp-compress-18', which also mentioned in the following trhead:
http://www.linuxfly.org/post/642/
Gee! How can I assume you could remember everything FOR EVER! It's bound to be forgot!
To start VPN now, run the following:
sudo pon AlbitaVPN nodetach
Some other networking knowledge along the road
PPTP Client
Mppe Installation Upgrades Question
sudo modprobe ppp-compress-18if you don't see any message, you are ok.
Next, check that pppd program contains MPPE support by entering
strings `which pppd`|grep -i mppe|wc --lines
if you get a number, you are ok. I get 43.
which also gives links to:
PPTP Client Diagnosis HOWTO
and
PPTP Client Debian HOWTO
How to route only specific subnet (source ip) to a particular interface
policy based routing
A simple introduction (with a nice easy example) to source based routing
Gateways and Routes
From `man pppd` -(Point-to-Point Protocol Daemon)
PPP is the protocol used for establishing internet links over dial-up modems, DSL connections, and
many other types of point-to-point links. The pppd daemon works together with the kernel PPP driver
to establish and maintain a PPP link with another system (called the peer) and to negotiate Internet
Protocol (IP) addresses for each end of the link. Pppd can also authenticate the peer and/or supply
authentication information to the peer. PPP can be used with other network protocols besides IP,
but such use is becoming increasingly rare.
Some debugging strings
pptp --version
lsmod | grep ppp
cat /etc/ppp/options.pptp
pon vpn-name debug dump logfd 2 nodetach
less /var/log/pppd.log
egrep '^[^#]' /etc/ppp/options.pptpd
PPTP Client Routing HOWTO
Creating VPN Connection on Linux (Ubuntu) using command line (PPTP Client for windows VPN Server)
- /etc/ppp/peers/myvpn (Suppose we have given name to tunnel or connection as myvpn for our identity purpose)
- /etc/ppp/chap-secrets
- Server name or ip address of vpn server.
- User name and password to connect vpn server.
- Most important pptp-linux package
补充(2013-09-27)
要在新机器上配置VPN,就又翻出来看了一遍,有些新的理解,不知道对不对
PPTP Client: pptp-linux
PPP: Point-to-Point Protocol daemon, 是个支持MPPE加密的package,主要包含pppd程序(上面的man pppd和检测是否支持MPPE)
注意:Thepptp-linux package does not depend on ppp (>= 2.4.2)because it is possible to configure a tunnel without encryption.
- Setup VPN connection (Microsoft PPTP) for Ubuntu 12.04
- Ubuntu VPN PPTP 配置
- Ubuntu PPTP VPN 搭建
- ubuntu配置vpn(pptp)
- ubuntu安装vpn PPTP
- ubuntu连接pptp vpn
- How to setup VPN server (PPTP on CentOS, RedHat and Ubuntu)
- ubuntu连接vpn服务器(pptp)
- Ubuntu PPTP VPN Server 设置
- Ubuntu配置PPTP的VPN
- ubuntu连接vpn服务器(pptp)
- Ubuntu搭建VPN服务(PPTP)
- ubuntu安装pptp vpn客户端
- Ubuntu PPTP VPN Setting Tutorial
- ubuntu 16.04 搭建 pptp vpn
- How To Setup Your Own VPN With PPTP
- 【转】ubuntu server 安装VPN pptp
- Ubuntu Xen VPS安装PPTP VPN
- poj 2723 Get Luffy Out 2sat
- 64位操作系统安装asp.net2.0框架不支持解决办法
- 进程间通信之消息队列
- FileReference 类
- Git版本控制--tag标签的使用(二)
- Setup VPN connection (Microsoft PPTP) for Ubuntu 12.04
- 如何在 ASM 存储中使用 Data Pump (expdp impdp)进行数据导出导入操作
- hash Babelfish poj 2503
- C/C++代码格式优化工具----astyle
- SEAndroid策略
- POJ 1696/hrbustoj 1318 几何 蛋疼的蚂蚁
- ASIHTTPRequest类库简介和使用说明
- java的2道逻辑算法题
- C#中Winform动态调用Webservice的方法