Howto configure PPTP VPN in Ubuntu Intrepid and Jaunty
Sponsored Link
Method 1
Preparing your system
First you need to install the following packages
sudo apt-get install pptp-linux ppp pptpd
Configuration
First you need to edit /etc/ppp/chap-secrets file
sudo gedit /etc/ppp/chap-secrets
add the following line
Username PPTP Password *
Save and exit the file
Create /etc/ppp/peers/vpn1 file using the following command.The ‘peers' folder may be owned by group ‘dip' so get around that by adding yourself to the group .
touch /etc/ppp/peers/vpn1
sudo gedit /etc/ppp/peers/vpn1
Add the following to the vpn1 file
pty "pptp remote.gateway.address.here --nolaunchpppd"
name Username
remotename PPTP
require-mppe-128
file /etc/ppp/options.pptp
ipparam vpn1
mru 1412
mtu 1412
Edit the options.pptp file as required. commented out the ‘refuse-chap' and ‘refuse-mschap-v2' lines.
Establish the VPN connection with
sudo pppd call vpn1
or
sudo pon vpn1
Drop the connection when you're done with
sudo poff vpn1
create ‘/etc/ppp/ip-up.d/route-traffic' as follows.
#!/bin/bash
NET="10.0.0.0/8″
IFACE="ppp0″
route add -net ${NET} dev ${IFACE}
Make the file executable using the following command
sudo chmod 755 /etc/ppp/ip-up.d/route-traffic
Replace the "10.0...." address with the range of addresses you need to access on your remote machine.
So, to get the VPN up in Jaunty, Do the following (in /etc/ppp/ip-up.d)
sudo pon vpn1
sudo ./route-traffic
Method 2
Using GUI
From the network manager in the upper right hand corner of your desktop.
Click on "VPN Connections", then "Configure VPN..."
In the Network Connections window, select your VPN Connection and then click the "Edit" button.
In the "Editing Your_VPN PPTP" window, click on the "IPv4 Settings" and then the "Routes..." button.
In the "Editing IPv4 routes...." window, check the box for "Use this connection only for resources on its network".
Now click the "Add" button.I added the Address/Netmask/Gateway information I had to click each box as it seemed to loose the curser position. In my case I work address were in the XXX.YYY.0.0 range so I used a netmask of 255.255.0.0. I set the Gateway to my local router which is 192.168.1.1 (pretty standard). I also used the
value "1" for the Metric. I had to click the "Add" button. This was the only way I could get it to take.
Here was another little tip. While attempting to use this GUI we ended up with several empty routes by accident. The GUI would not let me click on "OK" until we deleted all the empty routes. Just try clicking below your last route. If you are able to make a selection, you have an empty route.
Just click the "Delete" button and you should be good.
Click on "OK", then "Apply", then "Close". Now test your VPN and see if it works any better.
Jaunty Users Tip
-- When you configure the VPN connexion, go to the "advanced" settings"
-- Uncheck "EAP" at the top
-- check the "mppe" parameter
-- Try to connect to your microsoft VPN server,
Source from here
Can anybody tell me how to setup simple VPN (not pptp) using generated keys? Without network-manager installed.
How can this be done in Hardy ? is it possible ?
I would like a guide to getting an IPSEC VPN connection established. I just can’t get mine to work!
thanks for the tut!
also below worked 4 me
pty “pptp remote.gateway.address.here
--
nolaunchpppd”The one gotcha with this pptp stuff is that it requires your network iface to be using DHCP.
This is only for wine and i have not tried with crossover
Here are some additional notes I neede to get my vpn working:
1. For Ubuntu 9.10 for the pon to work, copy the
/etc/ppp/options.pptp to
/.etc/ppp/options.pptp (not a typo, create a .etc under root)
2. I was trying to connect to another server once I made my VPN connection. I verified VPN with route. But couldn’t get to my Server.
I needed
in /etc/ppp/ip-up.d/route-traffic
route -add -host xxx.xxx.xxx.xx dev ppp0
where xxx is the Server Address.
then I could telnet to server.
3. after doing sudo poff vpn1, I noticed the route command still had a connection to vpn.
route delete -host xxx.xxx.xx.xxx
removes line from route
where xxx.xxx.xxx.xx is the IP address of the Vpn in the route.
You should really differentiate between what to do on the server side versus the client side.
I have set up PPTP VPN server on ubuntu.
But accounts are open for concurrent simultaneous connections. means there can be many users using one account at the time.
i need to limit that to one user at the time.
anybody knows how it can be done?
AWESOME !!! ^_^
thx !
It works fine, thanks a lot for the how-to but is it possible to run it on boot? I need the VPN connection being established before a user logs in GDM.