Gentoo as a OpenVPN Client

You guessed this was coming…

Its quite simple to set up Gentoo as an OpenVPN client.

# emerge-av net-misc/openvpn

Now we need to create a config file and a place to store the keys. All config files (.conf) for your VPN connections should live under “/etc/openvpn”
This is the config file for the previous article (you can find the sample  configs on the server)
# cd /etc/openvpn
# vim server1.conf
cipher AES-128-CBC
dev tun
proto udp
remote server1 1194
resolv-retry infinite
ca /etc/openvpn/pki/server1/ca.crt
cert /etc/openvpn/pki/server1/client.crt
key /etc/openvpn/pki/server1/client.key
ns-cert-type server
verb 3
ping 10
ping-restart 60
tun-mtu 1500
mssfix 1400

Copy you client.key, client.crt and ca.crt into the “/etc/openvpn/pki/server1” directory. You can set this to any directory the above makes sense to me.

Now you need to create a start script.
# cd /etc/init.d
# ln -s openvpn openvpn.server1

You can now start your  vpn connection to server1 with:-
# /etc/init.d/openvpn.server1


One Response to “Gentoo as a OpenVPN Client”

  1. hosting…

    […]Gentoo as a OpenVPN Client « Le Pig[…]…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: