In order to set up a VPN connection with pptp or openvpn using a GUI I did the following ( as root ) :
apt-get install network-manager-gnome network-manager-openvpn-gnome network-manager-pptp-gnome
The nm-applet showed an unmanaged Wired connection. Unmanaged devices means NetworkManager doesn't handle those network devices.
You need to edit as root the following files :
(1) /etc/NetworkManager/NetworkManager.conf
Change line managed=false in managed=true
(2) /etc/network/interfaces
Comment out the last two lines
# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
So it will look like this :
# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp
Restart NetworkManager :
/etc/init.d/network-manager restart
Now nm-applet shows a managed connection :
Choose Network Settings in nm-applet and click on the + sign and create a VPN Interface
Choose PPTP and the following window opens up :
Go to VPNBook and look for the PPTP settings. I choose Server #3 : uk1.vpnbook.com (UK VPN - optimized for fast web surfing; no p2p downloading).
Connection name : uk1.vpnbook.com
Gateway : uk1.vpnbook.com
User name : vpnbook
Password : phefra7U ( password changes every one to two weeks ! )
Check Available for all users
Go to Advanced and check Use Point-to-Point encryption ( MPPE )
Now you can go to the nm-applet and choose the VPN connection......but nothing happened....
tail -f /var/log/syslog ( as root ) showed a message about Failed to request VPN secrets #2: (6) No agents were available for this request.....
After some Googling I found a solution ( link ) :
As root edit /etc/NetworkManager/system-connections/uk1.vpnbook.com and under [vpn], change the password flags line to:
password-flags=0
And add the following:
[vpn-secrets]
password=phefra7U
Then again : /etc/init.d/network-manager restart
Now it works...
In order to get OpenVPN working I found a solution at this post http://howto.praqma.net/ubuntu/vpn/openvpn-access-server-client-on-ubuntu
Go to VPNBook and download one of the OpenVPN Certificate Bundles ( e.g Server #3 ).
Unzip the file and choose one of the ovpn files. Follow the instructions in the above link from the line
Open client.opvn in an editor....till....Remove both < key >
Insert the following lines in the ovpn file :
ca ca.crt
cert client.crt
key client.key
Activities > Applications >Network Connections > VPN > Import.
Choose your ovpn file and fill in username and password...
As root edit /etc/NetworkManager/system-connections/vpnbook-uk1-tcp80 and under [vpn], change the password flags line to:
password-flags=0
And add the following:
[vpn-secrets]
password=phefra7U
Again : /etc/init.d/network-manager restart
Update : I noticed that these OpenVPN Certificate Bundles may change as well, so you have to repeat the procedure above from time to time....
Thank you!
ReplyDelete