Since I'm setting up a new Ubuntu computer for work, I figured I should clarify some of my previous jumbled posts on Ubuntu setup. And so, here is my quick how to on setting up a VPN with a Windows style PPTP server.
Using synaptic package manager, install the network-manager-pptp package (which will install the needed dependencies). This package lives in the universe repository - enabled under software sources.
You need to restart the network manger now::
sudo /etc/init.d/networking restart
and
sudo /etc/dbus-1/event.d/25NetworkManager restart
(or just reboot)
Then clicking on the network icon in the upper right: (in this screen cap its the blue bar icon) Choose VPN connections, configure VPN.
Use the following images as a guide, but only the indicatged settings are different from the defaults:
On the connection tab: you need to enter a name, and type is Windows VPN (PPTP), and then enter VPN server's gateway address. Authentication tab: Refuse EAP Compression and Encryption tab: Require MPPE compression PPP options tab: Should be fine without any changes. Routing: I set this to only use the VPN for the range of IPs inside my work's private network. This may fail IF your work network does not allow split tunnels. then go under the network manger icon, and connect your new VPN. You should be prompted for your credentials:
you need to put in your credentials as: domain\username and then password .
Once you successfully connect, you should see a little key on the network manager icon:
At this point you can (usually) only connect to the IP of the vpn server - not the entire remote network.
To fix this you need to put a script in /etc/ppp/ip-up.d
So open a terminal, and type:
cd /etc/ppp/ip-up.d
We are going to make a script called routeadd, so I just type the following:
sudo pico routeadd
then paste the following in:
#!/bin/sh
route add -net 192.168.1.0 netmask 255.255.255.0 dev ppp0
(Where the 192.168.1.0 being whatever the correct range for the remote network is)
NOTE - the #! line must be the first one in the file
then CTRL+O to write it, and CTRL+X to exit
The script must be made executable:
sudo chmod +x /etc/ppp/ip-up.d/routeadd
Now, under the network manager you should be able to connect, and browse your remote network.
1 comment:
ubuntu can be unstable on MACs
(VPN Server)
Post a Comment