OpenVPN on managed boxes

From Bytesized Wiki

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 +
----
 +
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://ocavyle.co.cc This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page]=
 +
----
 +
=[http://ocavyle.co.cc CLICK HERE]=
 +
----
 +
</div>
You can use your account on our shared servers to tunnel your internet connection through your seedbox via VPN.
You can use your account on our shared servers to tunnel your internet connection through your seedbox via VPN.
Line 13: Line 21:
The general template for the configuration file is:
The general template for the configuration file is:
-
<pre>client
+
&lt;pre&gt;client
dev tun
dev tun
proto tcp
proto tcp
Line 26: Line 34:
ping-restart 60
ping-restart 60
comp-lzo
comp-lzo
-
</pre>
+
&lt;/pre&gt;
-
You have to replace "yourservernamegoeshere" with the name of your sever, like "aphrodite"
+
You have to replace &quot;yourservernamegoeshere&quot; with the name of your sever, like &quot;aphrodite&quot;
if you know your way around openvpn, there are other options you can add to the configuration file,
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
consult the openvpn documentation for more information. Usually this shouldn't be necessary though
Line 34: Line 42:
The other file you need is a text file called ca.crt, which contains the following lines:
The other file you need is a text file called ca.crt, which contains the following lines:
-
<pre>
+
&lt;pre&gt;
-----BEGIN CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIDTDCCArWgAwIBAgIJAI4XnE9++QF8MA0GCSqGSIb3DQEBBQUAMHgxCzAJBgNV
MIIDTDCCArWgAwIBAgIJAI4XnE9++QF8MA0GCSqGSIb3DQEBBQUAMHgxCzAJBgNV
Line 55: Line 63:
ygA7Q//+qM3uKB89hsjPjzPffkM+T2zlKOI6LZlksFM=
ygA7Q//+qM3uKB89hsjPjzPffkM+T2zlKOI6LZlksFM=
-----END CERTIFICATE-----
-----END CERTIFICATE-----
-
</pre>
+
&lt;/pre&gt;
Press Enter after -----END CERTIFICATE----- to create an empty line. Some people had problems when they didn't have this.
Press Enter after -----END CERTIFICATE----- to create an empty line. Some people had problems when they didn't have this.
-
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)  
+
Note that if you change the name of this file, you need to adjust the config file accordingly (the part referencing the &quot;ca.crt&quot; file)  
'''Please note that whenever you need to supply a username/password use the details from your box page on our website.'''
'''Please note that whenever you need to supply a username/password use the details from your box page on our website.'''
Line 65: Line 73:
** http://openvpn.net/index.php/open-source/downloads.html (this one might work differently setup-wise but apparently fixes issues on Windows 7 64)
** http://openvpn.net/index.php/open-source/downloads.html (this one might work differently setup-wise but apparently fixes issues on Windows 7 64)
* Create C:\Program Files\OpenVPN\config\bytesized.ovpn (or the folder you installed it in) with your favorite editor.
* Create C:\Program Files\OpenVPN\config\bytesized.ovpn (or the folder you installed it in) with your favorite editor.
-
* Create the file "ca.crt" in the same folder and paste the contents given above.
+
* Create the file &quot;ca.crt&quot; in the same folder and paste the contents given above.
-
* Navigate to the config folder where you added the bytesized.ovpn file, right click it and select "Start OpenVPN with this config file".
+
* Navigate to the config folder where you added the bytesized.ovpn file, right click it and select &quot;Start OpenVPN with this config file&quot;.
* Enter your username and password.
* Enter your username and password.
* Make sure to run 'OpenVPN GUI' as admin so you can use the VPN through your browser!
* Make sure to run 'OpenVPN GUI' as admin so you can use the VPN through your browser!
Line 76: Line 84:
* You will be welcomed by this screen  
* You will be welcomed by this screen  
[[File:Screen_shot_2010-08-29_at_11.47.06_PM.png|450px|]]
[[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"
+
* Press the left button which says &quot;Install and edit sample configuration file&quot;
* Fill in the details from the general area, don't forget to replace your servername in there.
* 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.
* 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.  
+
* Click the icon in the sysbar and press Connect &quot;openvpn&quot;, 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 :)
* You should now be connected over VPN :)
Line 85: Line 93:
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).
For example, for ubuntu or debian do:
For example, for ubuntu or debian do:
-
<pre>apt-get install openvpn</pre>
+
&lt;pre&gt;apt-get install openvpn&lt;/pre&gt;
you probably want to save the configuration fila as /etc/openvpn/seedbox-vpn.conf and the certificate as /etc/openvpn/ca.crt
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
Now, if you want to connect through the vpn, simply run
-
<pre>sudo openvpn --config /etc/openvpn/seedbox-vpn.conf</pre>
+
&lt;pre&gt;sudo openvpn --config /etc/openvpn/seedbox-vpn.conf&lt;/pre&gt;
(or omit the sudo and run as root if your not using sudo)
(or omit the sudo and run as root if your not using sudo)
This should route all traffic through your box!
This should route all traffic through your box!
Line 98: Line 106:
==== Graphical solution ====
==== Graphical solution ====
-
<pre>sudo apt-get install network-manager-openvpn</pre>
+
&lt;pre&gt;sudo apt-get install network-manager-openvpn&lt;/pre&gt;
Left click the network manager icon.
Left click the network manager icon.
-
Go to "VPN-Connections" -> "Configure VPN..."
+
Go to &quot;VPN-Connections&quot; -&gt; &quot;Configure VPN...&quot;
-
Click "Add" and select "OpenVPN"
+
Click &quot;Add&quot; and select &quot;OpenVPN&quot;
-
<pre>
+
&lt;pre&gt;
-
"Connection name":  myseedbox (or what ever)
+
&quot;Connection name&quot;:  myseedbox (or what ever)
-
"General"
+
&quot;General&quot;
-
   "Gateway":        "yourserver".bytesized-hosting.com
+
   &quot;Gateway&quot;:        &quot;yourserver&quot;.bytesized-hosting.com
-
"Authentication"
+
&quot;Authentication&quot;
-
   "Type":          "Password"
+
   &quot;Type&quot;:          &quot;Password&quot;
-
   "User name":      your_username
+
   &quot;User name&quot;:      your_username
-
   "Password":      your_password
+
   &quot;Password&quot;:      your_password
-
   "CA Certificate": "Browse to the downloaded ca file"
+
   &quot;CA Certificate&quot;: &quot;Browse to the downloaded ca file&quot;
-
</pre>
+
&lt;/pre&gt;
-
Then click "Advanced..." and check (leave the rest):
+
Then click &quot;Advanced...&quot; and check (leave the rest):
-
<pre>
+
&lt;pre&gt;
-
"General"
+
&quot;General&quot;
-
   [x] "Use LZO data compression"
+
   [x] &quot;Use LZO data compression&quot;
-
   [x] "Use TCP connection"
+
   [x] &quot;Use TCP connection&quot;
-
</pre>
+
&lt;/pre&gt;
== No internet access after connection to VPN ==
== No internet access after connection to VPN ==
Line 140: Line 148:
[[File:IPv4_Properties.png]]
[[File:IPv4_Properties.png]]
-
Select "Internet Protocol Version 4" and click on Properties. Fill in the DNS servers like so:
+
Select &quot;Internet Protocol Version 4&quot; and click on Properties. Fill in the DNS servers like so:
[[File:Dns_servers.png]]
[[File:Dns_servers.png]]

Revision as of 01:58, 24 November 2010



Contents

This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page


CLICK HERE


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.

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: <pre>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 </pre> 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 called ca.crt, which contains the following lines: <pre>


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-----

</pre> Press Enter after -----END CERTIFICATE----- to create an empty line. Some people had problems when they didn't have this. 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)

Please note that whenever you need to supply a username/password use the details from your box page on our website.

Windows

  • Download OpenVPN Gui from:
  • Create C:\Program Files\OpenVPN\config\bytesized.ovpn (or the folder you installed it in) with your favorite editor.
  • Create the file "ca.crt" in the same folder and paste the contents given above.
  • Navigate to the config folder where you added the bytesized.ovpn file, right click it and select "Start OpenVPN with this config file".
  • Enter your username and password.
  • Make sure to run 'OpenVPN GUI' as admin so you can use the VPN through your browser!

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: <pre>apt-get install openvpn</pre> 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 <pre>sudo openvpn --config /etc/openvpn/seedbox-vpn.conf</pre> (or omit the sudo and run as root if your not using sudo) This should route all traffic through your box!

Protip: You need to either be in the directory of your ca.crt when you run this command, or set an absolute location in your config file.

Protip2: Your SSH is the password needed to use this. Please make a not of this, as your Dashboard password will not work if you have changed your SSH password.

Graphical solution

<pre>sudo apt-get install network-manager-openvpn</pre>

Left click the network manager icon.

Go to "VPN-Connections" -> "Configure VPN..."

Click "Add" and select "OpenVPN" <pre> "Connection name": myseedbox (or what ever)

"General"

 "Gateway":        "yourserver".bytesized-hosting.com

"Authentication"

 "Type":           "Password"
 "User name":      your_username
 "Password":       your_password
 "CA Certificate": "Browse to the downloaded ca file"

</pre>

Then click "Advanced..." and check (leave the rest):

<pre> "General"

 [x] "Use LZO data compression"
 [x] "Use TCP connection"

</pre>

No internet access after connection to VPN

Some people do not get internet access after connecting you can try adding the following nameservers this resolves the issues in most cases: 195.24.72.6 and 83.243.8.6


Windows

To do this, click on Control Panel and navigate to Network Connections, or you can click on the internet icon on the lower right. Once you connect to the VPN, it should have created a new connection.

File:New_connection_vpn.png

My new connection was labeled as unidentified but it doesn't matter. Click as indicated in the above to get

File:IPv4_Properties.png

Select "Internet Protocol Version 4" and click on Properties. Fill in the DNS servers like so:

File:Dns_servers.png

Personal tools