/home/zg/.wine/drive_c/Program Files/proXPN/config
├── ProXPN.ovpn
└── ssl
├── ca.crt
├── client.crt
└── client.key
The ProXPN.ovpn config file points to the ssl/foo.bar SSL certificate files which is a pain, there is a way to embed those SSL files directly into the config file, but for now it's too much trouble and I'll just start the OpenVPN tunnel from the config directory so that the files can be found using their relative paths.
sudo openvpn --config ProXPN.ovpn --remote miami.proxpn.com 443 --route-nopull
The `--rout-nopull` is just to keep this tunnel from mucking up my other VPN. The `--remote` is a guess that works, as a premium user you probably have a list of servers that you can connect to.
Fri Mar 8 11:53:42 2013 us=297872 Current Parameter Settings:
Fri Mar 8 11:53:42 2013 us=298064 config = 'ProXPN.ovpn'
Fri Mar 8 11:53:42 2013 us=298147 mode = 0
Fri Mar 8 11:53:42 2013 us=298193 persist_config = DISABLED
...
Enter Auth Username:MYEMAIL@gmail.com
Enter Auth Password:MYPASSWORD
...
Fri Mar 8 11:53:56 2013 us=875924 TUN/TAP device tun1 opened
Fri Mar 8 11:53:56 2013 us=875951 TUN/TAP TX queue length set to 100
Fri Mar 8 11:53:56 2013 us=875969 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Fri Mar 8 11:53:56 2013 us=875999 /sbin/ifconfig tun1 173.0.10.154 netmask 255.255.255.0 mtu 1500 broadcast 173.0.10.255
Fri Mar 8 11:53:56 2013 us=896665 Initialization Sequence Completed
And voila I have a `tun1` device because I already have a `tun0` device in use... and no routes because I didn't want any.
# ifconfig tun1
tun1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:173.0.10.154 P-t-P:173.0.10.154 Mask:255.255.255.0
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
...
# route -n | fgrep tun1
173.0.10.0 0.0.0.0 255.255.255.0 U 0 0 0 tun1
Normally it would have added a `0.0.0.0` default route through the tunnel.
#!/bin/bash
openvpn --config ${PATH_TO_CONFIG} --writepid /var/run/openvpn-proxpn.pid --daemon openvpn-proxpn
That roughly mimics the way I use my normal VPN. Check the config and activate your desired remote server. You could also comment out the one active `remote` configuration line and pass it as a command line argument `--remote SERVER PORT`. Terminate the VPN by `kill $(cat /var/run/openvpn-proxpn.pid)`.
zengargoyle@zim:~$
You probably have automatic updates and such enabled so you should be able to just install packages without updating, but it's a decent idea to get into the habit of doing an update before installing stuff so...
zengargoyle@zim:~$ sudo apt-get update
[sudo] password for zengargoyle:
`sudo` is the program that gives you super powers to do things that normally only the 'root' user can do. It will ask you for your password, then it will spew a bunch of stuff.
Ign http://us.archive.ubuntu.com precise InRelease
Ign http://us.archive.ubuntu.com precise-updates InRelease
Ign http://us.archive.ubuntu.com precise-backports InRelease
Ign http://security.ubuntu.com precise-security InRelease
Hit http://us.archive.ubuntu.com precise Release.gpg
Get:1 http://security.ubuntu.com precise-security Release.gpg [198 B]
Ign http://extras.ubuntu.com precise InRelease
Get:2 http://us.archive.ubuntu.com precise-updates Release.gpg [198 B]
...
Hit http://us.archive.ubuntu.com precise-backports/restricted Translation-en
Hit http://us.archive.ubuntu.com precise-backports/universe Translation-en
Fetched 2,984 kB in 13s (225 kB/s)
Reading package lists... Done
zengargoyle@zim:~$
Now you can install the `openvpn` package.
zengargoyle@zim:~$ sudo apt-get install openvpn
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
openvpn
0 upgraded, 1 newly installed, 0 to remove and 83 not upgraded.
Need to get 0 B/445 kB of archives.
After this operation, 1,058 kB of additional disk space will be used.
...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
zengargoyle@zim:~$
It may need to install some additional things and may ask you a '(Y/n)' question, mostly just answer yes.
zengargoyle@zim:~$ wget jklmnop.net/metafilter/proxpn.ovpn
--2013-03-09 13:49:48-- http://jklmnop.net/metafilter/proxpn.ovpn
Resolving jklmnop.net (jklmnop.net)... 69.163.177.181, 2607:f298:1:107::e0e:b403
Connecting to jklmnop.net (jklmnop.net)|69.163.177.181|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8201 (8.0K) [text/plain]
Saving to: `proxpn.ovpn.1'
100%[======================================>] 8,201 --.-K/s in 0.03s
2013-03-09 13:49:48 (317 KB/s) - `proxpn.ovpn.1' saved [8201/8201]
zengargoyle@zim:~$
I think Ubuntu installs `wget` by default, but if it doesn't you just have to do the `sudo apt-get install wget` thing to install it.
zengargoyle@zim:~$ sudo openvpn --config proxpn.ovpn
Sat Mar 9 13:50:18 2013 us=266192 Current Parameter Settings:
Sat Mar 9 13:50:18 2013 us=266266 config = 'proxpn.ovpn'
Sat Mar 9 13:50:18 2013 us=266284 mode = 0
Sat Mar 9 13:50:18 2013 us=266299 persist_config = DISABLED
Sat Mar 9 13:50:18 2013 us=266314 persist_mode = 1
Sat Mar 9 13:50:18 2013 us=266341 NOTE: --mute triggered...
Sat Mar 9 13:50:18 2013 us=266371 268 variation(s) on previous 5 message(s) suppressed by --mute
Sat Mar 9 13:50:18 2013 us=266388 OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Mar 30 2012
Enter Auth Username:YOUR_USERNAME_GOES_HERE
Enter Auth Password:YOUR_PASSWORD
And it should continue and spew lots of stuff and hopefully it just seems to stop with a success message (but it doen't get you back to a prompt or anything).
...
Sat Mar 9 13:50:40 2013 us=267295 TUN/TAP device tun0 opened
Sat Mar 9 13:50:40 2013 us=267328 TUN/TAP TX queue length set to 100
Sat Mar 9 13:50:40 2013 us=267352 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Sat Mar 9 13:50:40 2013 us=267393 /sbin/ifconfig tun0 173.0.4.212 netmask 255.255.255.0 mtu 1500 broadcast 173.0.4.255
Sat Mar 9 13:50:40 2013 us=273108 /sbin/route add -net 173.0.14.249 netmask 255.255.255.255 gw 192.168.1.254
Sat Mar 9 13:50:40 2013 us=275439 /sbin/route del -net 0.0.0.0 netmask 0.0.0.0
Sat Mar 9 13:50:40 2013 us=276692 /sbin/route add -net 0.0.0.0 netmask 0.0.0.0 gw 173.0.4.1
Sat Mar 9 13:50:40 2013 us=277846 Initialization Sequence Completed
Now open firefox or whatever and browse around and find a "show me my ip" page somewhere. You should be all VPN'd.
^CSat Mar 9 13:53:28 2013 us=588160 event_wait : Interrupted system call (code=4)
Sat Mar 9 13:53:28 2013 us=588611 TCP/UDP: Closing socket
Sat Mar 9 13:53:28 2013 us=588680 /sbin/route del -net 173.0.14.249 netmask 255.255.255.255
Sat Mar 9 13:53:28 2013 us=590410 /sbin/route del -net 0.0.0.0 netmask 0.0.0.0
Sat Mar 9 13:53:28 2013 us=591523 /sbin/route add -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.1.254
Sat Mar 9 13:53:28 2013 us=592583 Closing TUN/TAP interface
Sat Mar 9 13:53:28 2013 us=592619 /sbin/ifconfig tun0 0.0.0.0
Sat Mar 9 13:53:28 2013 us=630482 SIGINT[hard,] received, process exiting
zengargoyle@zim:~$
If you have errors starting the openvpn, double check your username/password of course, but you may need to change the remote server (I'm using miami.proxpn.com in the config, but that may be just for the free accounts...) Just use your favorite editor like say `gedit` is a handy one (if it's not already installed, do the `sudo apt-get install gedit` thing to install it). Edit the 'proxpn.ovpn' file and you'll see a long list of possible remote settings:
zengargoyle@zim:~$ gedit proxpn.ovpn
...
...
reneg-sec 0
remote miami.proxpn.com 443
#remote m1.proxpn.com 443
#remote m1.proxpn.org 443
#remote m1.secureconnect1.com 443
#remote m1.proxpn.com 8080
#remote m1.proxpn.org 8080
#remote m1.proxpn.com 80
...
Just comment out the miami line and uncomment some other remote, save the file and try again. Or you can comment out all of the remote lines and instead pass them in on the command line.
zengargoyle@zim:~$ sudo openvpn --config proxpn.ovpn --remote miami.proxpn.com 443
So, see if you can get openvpn to start from the Terminal (with liberal use of `sudo`) and if this works for your premium account then the starting/stopping part can be at least wrapped up into a desktop like file that you just click on, or a script that you can just pop up the Run Command box of some sort and type `proxpn start` or something to turn it on and off.
zengargoyle@zim:~$ cat /var/run/nm-dns-dnsmasq.conf
server=8.8.8.8
server=4.2.2.1
zengargoyle@zim:~$ ps auxw | fgrep dnsmasq
nobody 26133 0.0 0.0 33020 1440 ? S 20:56 0:00 /usr/sbin/dnsmasq.bin
--no-resolv --keep-in-foreground --bind-interfaces --pid-file=/var/run/sendsigs.omit.d
/network-manager.dnsmasq.pid --listen-address=127.0.0.1 --conf-file=/var/run/nm-
dns-dnsmasq.conf --cache-size=0 --proxy-dnssec
Notice how dnsmasq has a start time 20:56 which was just a few minutes ago, and the servers are changed.
dns=dnsmasq
sudo ifup proxpn
to bring up the vpn. And a similar `sudo ifdown proxpn` to turn it off again.
sudo cp proxpn.ovpn /etc/openvpn/proxpn.conf
Edit that new copy and find the line that says `dev tun` and change that to `dev proxpn`, and add a line that says `dev-type tun`. We're basically changing it from a device named 'tun' that implies a device type of 'tun' to a device named 'proxpn' and explicitly specifying that it's a device type of 'tun'.
sudo gedit /etc/openvpn/proxpn.conf
...
dev proxpn
dev-type tun
...
Now we just need to tell the system about this new interface. Edit `/etc/network/interfaces` and add a new section.
sudo gedit /etc/network/interfaces
...
auto proxpn
iface proxpn inet manual
openvpn proxpn
...
sudo ifup proxpn
Hopefully that last command propted you for your username/password and started up the vpn. But there's still a bit more to do to finish things up.
AUTOSTART="none"
this will keep the vpn from starting automatically at boot.
...
auth-user-pass proxpn.pass
...
and that should keep you from actually having to type in your username/password when you start the vpn.You are not logged in, either login or create an account to post comments
I am connecting to a Cisco VPN and it works just ducky. I can provide more detail when I get home from work if you're interested.
How are you with the command line? I assume you're OK with it since you're running Linux!
posted by Currer Belfry at 12:50 PM on March 7