Monday, February 28, 2011

openVPN, SliceHost, and OSX

Spent some time at the local coffee shop today, and got really paranoid about others sniffing my wireless bytes...  so I spent the whole visit setting up openVPN on my slicehost.

I found a good guide on the internet, but had to make some modifications to get it to work.

I am currently using the Viscosity openVPN client for osx: http://www.thesparklabs.com/viscosity/

Here is the guide that I used: http://ggin.com/blog/openvpn-setup-on-vps/

Modifications:

(I didn't build it from source)

cp -R /usr/share/doc/openvpn/examples/easy-rsa /etc/open/vpn

Should be:

cp -R /usr/share/doc/openvpn/examples/easy-rsa /etc/openvpn

When he says to do: ./vars I had to do source ./vars first.

Before doing:

sudo cp /usr/share/doc/openvpn/example/sample-config-files/server.conf /etc/openvpn/

I had to gunzip the server.conf.gz file and the path should actually be:
/usr/share/doc/openvpn/examples/sample-config-files/

For IPTables rules I used:


sudo vim /etc/iptables.test.rules
*nat
-A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
COMMIT
*filter
-A INPUT -i tun+ -j ACCEPT
-A FORWARD -i tun+ -j ACCEPT
-A FORWARD -o tun+ -j ACCEPT
-A INPUT -p udp --dport 1194 -j ACCEPT


.. and that was basically it! Just make sure to use the right files when setting up Viscosity:

CA ca.crt
Cert username.crt
Key username.key

(I don't have User/Pass authentication enabled in the client)

No comments: