OpenVPN on managed boxes

From Bytesized Wiki

(Difference between revisions)
Jump to: navigation, search
(Created page with 'You can use your account on our shared servers to tunnel your internet connection through your seedbox via VPN. To achieve this, you need to setup openvpn on your local machine …')
(OS X)
Line 61: Line 61:
TODO, if anyone wants to write this up, go ahead ^^, you probably want to use something like [[http://openvpn.se/]]
TODO, if anyone wants to write this up, go ahead ^^, you probably want to use something like [[http://openvpn.se/]]
== OS X ==
== OS X ==
-
Tunnelblick stuff goes here.
+
We are gonna use Tunneblick to setup OpenVPN on OSX
 +
 
 +
* Download Tunennelblick from the [http://code.google.com/p/tunnelblick/ homepage]
 +
* You will be welcomed by this screen
 +
[[File:Screen_shot_2010-08-29_at_11.47.06_PM.png|450px|]]
 +
* Press the left button which says "Install and edit sample configuration file"
 +
* Fill in the details from the general area, don't forget to replace your servername in there.
 +
* Open up a text-editor of your chose (It's best to use VIM/Nano TextEdit might want to try and safe the file as RTF) and copy/paste the contents of the ca.crt file given above save the file in  /Users/yourusername/Library/Application Support/Tunnelblick/Configurations.
 +
* Click the icon in the sysbar and press Connect "openvpn", if everything went well you will be prompted for your username and password. Be sure to use all lowercase characters for your username.  
 +
* You should now be connected over VPN :)
 +
 
== Linux ==
== Linux ==
For linux, install openvpn (either with your distribuions package manager or from source if not available).
For linux, install openvpn (either with your distribuions package manager or from source if not available).

Revision as of 22:23, 29 August 2010

You can use your account on our shared servers to tunnel your internet connection through your seedbox via VPN.

To achieve this, you need to setup openvpn on your local machine to connect to your seedbox.

Contents

Common Setup

Some general notes that apply to all operating Systems:

For openvpn setup, you need two files, you need the CA certificate and a configuration file, these are pretty much the same, no matter what operation system you use.

You should place both of these files in the same directory.

The general template for the configuration file is:

client
dev tun
proto tcp
remote yourservernamegoeshere.bytesized-hosting.com 1194
nobind
persist-key
persist-tun
ca ca.crt
auth-user-pass
verb 3
ping 10
ping-restart 60
comp-lzo

You have to replace "yourservernamegoeshere" with the name of your sever, like "aphrodite" if you know your way around openvpn, there are other options you can add to the configuration file, consult the openvpn documentation for more information. Usually this shouldn't be necessary though Options you may consider include: daemon, log or log-append


The other file you need is a text file calles ca.crt, which contains the following lines:

-----BEGIN CERTIFICATE-----
MIIDTDCCArWgAwIBAgIJAI4XnE9++QF8MA0GCSqGSIb3DQEBBQUAMHgxCzAJBgNV
BAYTAkxVMQswCQYDVQQIEwJMVTETMBEGA1UEBxMKTHV4ZW1ib3VyZzEMMAoGA1UE
ChMDdnBuMQ8wDQYDVQQDEwZ2cG4gQ0ExKDAmBgkqhkiG9w0BCQEWGXZwbkBieXRl
c2l6ZWQtaG9zdGluZy5jb20wHhcNMTAwODI5MDgwNjMzWhcNMjAwODI2MDgwNjMz
WjB4MQswCQYDVQQGEwJMVTELMAkGA1UECBMCTFUxEzARBgNVBAcTCkx1eGVtYm91
cmcxDDAKBgNVBAoTA3ZwbjEPMA0GA1UEAxMGdnBuIENBMSgwJgYJKoZIhvcNAQkB
Fhl2cG5AYnl0ZXNpemVkLWhvc3RpbmcuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GN
ADCBiQKBgQDPwLbi2zq8qa+zJNSyk26VfUXf6/T1mCWVetFCErd8jS6bSG2I+sC4
M5GLebFmYw/DRJO2eNJhbzYE+xQKFMyuZBAAZAs4C8+sOrk4P/Gza9hPV+uvnN2M
d35z7fhGwjRL2QRsb66ZcnKVkq0w4Hyvi21w9M0C8CKs7k3wmOTh0QIDAQABo4Hd
MIHaMB0GA1UdDgQWBBRGyr7sZAo5qxVPFhrsa4s3vJUqjDCBqgYDVR0jBIGiMIGf
gBRGyr7sZAo5qxVPFhrsa4s3vJUqjKF8pHoweDELMAkGA1UEBhMCTFUxCzAJBgNV
BAgTAkxVMRMwEQYDVQQHEwpMdXhlbWJvdXJnMQwwCgYDVQQKEwN2cG4xDzANBgNV
BAMTBnZwbiBDQTEoMCYGCSqGSIb3DQEJARYZdnBuQGJ5dGVzaXplZC1ob3N0aW5n
LmNvbYIJAI4XnE9++QF8MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEA
aPPM/WibmznY45XXKEw+wODhgUkVYA6Z/v+zQb0AaBRlwEfTN6wXr3aMmuC44U/4
k4ZQ2MG9rfA82bBASOROtcWmlQCYtfeyAgEdICxpnLaIixv/qhU/r67AsHheICEs
ygA7Q//+qM3uKB89hsjPjzPffkM+T2zlKOI6LZlksFM=
-----END CERTIFICATE-----

Note that if you change the name of this file, you need to adjust the config file accordingly (the part referencing the "ca.crt" file)

Windows

TODO, if anyone wants to write this up, go ahead ^^, you probably want to use something like [[1]]

OS X

We are gonna use Tunneblick to setup OpenVPN on OSX

  • Download Tunennelblick from the homepage
  • You will be welcomed by this screen

  • Press the left button which says "Install and edit sample configuration file"
  • Fill in the details from the general area, don't forget to replace your servername in there.
  • Open up a text-editor of your chose (It's best to use VIM/Nano TextEdit might want to try and safe the file as RTF) and copy/paste the contents of the ca.crt file given above save the file in /Users/yourusername/Library/Application Support/Tunnelblick/Configurations.
  • Click the icon in the sysbar and press Connect "openvpn", if everything went well you will be prompted for your username and password. Be sure to use all lowercase characters for your username.
  • You should now be connected over VPN :)

Linux

For linux, install openvpn (either with your distribuions package manager or from source if not available). For example, for ubuntu or debian do:

apt-get install openvpn

you probably want to save the configuration fila as /etc/openvpn/seedbox-vpn.conf and the certificate as /etc/openvpn/ca.crt

Now, if you want to connect through the vpn, simply run

sudo openvpn --config /etc/openvpn/seedbox-vpn.conf

(or omit the sudo and run as root if your not using sudo) This should route all traffic through your box!

Personal tools