Wednesday, May 27, 2009

How-to: Connect to UWM VPN in Ubuntu Linux

Go to: Applications >> Accessories >> Terminal

When the terminal opens, issue the following commands:

sudo apt-get install openvpn
wget https://pantherfile.uwm.edu/qkmadson/public/vpn/UWM.ovpn
wget https://pantherfile.uwm.edu/qkmadson/public/vpn/vpnca.crt
sudo openvpn --config UWM.ovpn

You will be prompted for your ePanther ID and password. After you issue the openvpn command and authenticate, a new network interface will appear. If you run the command:

ifconfig

... among the network interfaces listed, you should see:

tap0     Link encap:Ethernet  HWaddr 00:00:00:00:00:00
inet addr:129.89.210.XX Bcast:129.89.210.255 Mask:255.255.255.0
inet6 addr: fe80::10b4:4fff:fea8:1ea1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3665 errors:0 dropped:0 overruns:0 frame:0
TX packets:3308 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:3037109 (3.0 MB) TX bytes:687686 (687.6 KB)

... where 129.89.210.XX is your UWM IP address.

There is probably a way to configure the VPN through the Gnome GUI but, I could not find a way to do it. It would seem that one could:
  • click on the "Network Manager Applet"
  • click "VPN Connections"
  • click "Configure VPN"
  • click "Add"
By opening UWM.ovpn with a text editor, it seems pretty clear which settings to configure in the GUI but, I couldn't get it going. If you figure it out, please post the resolution here.

For other operating systems (Windows XP/Vista, Mac OS X), there are instructions and pre-packaged installations located at http://vpn.imt.uwm.edu.


[UPDATE] If you have problems:

I've noticed that DNS does not always get properly updated. Road Runner and other ISPs have their DNS servers locked down. Now that you have a UWM IP address, you can no longer use their DNS. To fix this, make sure to add the UWM DNS servers:

cat /etc/resolv.conf
domain madsonclan.net
search madsonclan.net
nameserver 129.89.7.14
nameserver 129.89.7.2
nameserver 65.24.7.10
nameserver 65.24.7.1
The 129.89.7.* addresses are for UWM and the 65.24.7.* addresses are for RR.

3 comments:

Unknown said...

Thanks for putting this out there, Quinn. Probably saved me a lot of time. An http://www.google.com/uwm search for 'vpn' found this blog entry.

I had to make one change from your directions on my ubuntu 9.04 'jaunty' box: the openvpn command exited, saying it couldn't open the tun device, permission denied. I simply reran with sudo, and all is good.

Thanks again, Jon Detert

Quinn Madson said...

Glad I could be of help, Jon. Thanks for the tip, too. I updated the post with your addition and added a section about DNS issues.

I don't know if there was an update to OpenVPN lately or what. I had to add the UWM DNS servers to my resolv.conf which I never had to do before.

Oh yeah, and welcome aboard, btw. ;)

TomViolin said...

This is very old info but it still works! Thank you.

I was able to get it working with the Gnome GUI tool no problem, there must have been a fix somewhere.

Also: ISPs have started to lock down their DNS servers so that they only answer to requests from their own network. Prevents DDoS and other such evilry.