Friday, May 17, 2013

How to setup VPN on Chrome OS

Chrome OS

In case you're running Chrome OS (e.g. on Chromebook, on a virtual machine, etc.), follow the steps below to create a L2TP or OpenVPN based VPN connection.
Note that when you want to connect simply via the ChromeOS GUI, you'll have to use L2TP protocol.
For using OpenVPN protocol, you'll have to use the console which might require that you get into developer mode. How to is explained below.

Setting up a VPN on Chromebook (quick instructions)

To set up a VPN on your Chromebook, follow these quick instructions, or scroll down for the step-by-step tutorial with screenshots.
  1. Click the network icon network icon in the top-right corner of your screen.
  2. In the list that appears, select Private networks.
  3. Click Add private network.
  4. In the box that appears, fill in the information below.
    • Server hostname: One of the L2TP server IPs http://hidemyass.com/vpn/r4662
    • Service name: Name it as you like. Eg: HMA! L2TP.
    • Provider type: Select L2TP/IPsec + Pre-shared key.
    • Pre-shared key: HideMyAss (case sensitive!)
    • Username: Your VPN account username
    • Password: Your PPTP Password. Can be found at http://vpn.hidemyass.com > PPTP Servers > Login Details
  5. Click Connect.

Step by step tutorial with screenshots

  • First, rightclick the time-bar in the bottom right of your desktop.
  • The settings overview will appear.
  • Here, click "Settings".
We want to create a new private network connection, so
  • please select "Add connection" and
  • and then select "Add private network...".
The "Add private network" window will appear. Here, please enter:
  • Server hostname: One of the L2TP server IPs http://hidemyass.com/vpn-config/l2tp/
     
  • Service name: Anything you want, e.g. "HMA L2TP VPN"
     
  • Provider type: L2TP/IPsec + pre-shared key
     
  • Pre-shared key: HideMyAss (attention, case sensitive!!)
     
  • Username: Your VPN account username
     
  • Password: Your PPTP password
    (get it from the VPN control panel under "PPTP servers")
Leave everything else to default (like in this screenshot).
Now click "Connect" and Chromium will attempt to connect
to the VPN server you chose.
While Chromium is still connecting, you'll see this icon next to
the private network connection you just created:
Once the connection has been made, the icon will change to
You should now see the icon, which means that the connection
has successfully beem made.

You can now select "Network options..." to get into a status
window of the newly created connection.

Or you can select "Disconnect" here, to disconnect from the VPN again.
This is the "Network options..." window that shows you additional
info about the connection, and allows you to set proxy-settings
(in case you're connected to the internet through a local proxyserver)
You can disconnect here as well.
That's all. To verify your current IP, go to websites like
http://ipaddress.com


Additional notes:

There have been reports of a bug making your VPN experience a bit annoying: about every 5 minutes, it automatically disconnects from your VPN and you can't reconnect unless you log out and in again, or delete your VPN and configure it again.
The Chrome OS developers are aware of this problem and you can keep track of this problem here and here. Star this issue in order to get it fixed earlier.
A workaround for now is opening a terminal (Ctrl+Alt+T) and starting an endless ping using ping google.com. This seems to work fine for affected systems.




OpenVPN on ChromeOS


Connecting via OpenVPN protocol on ChromeOS is a little bit tricky, because it currently does not accept common certificates and keys.
That means you can't connect using the ChromeOS GUI, like you would do with L2TP protocol as explained above.
So you'll have to use a small workaround:

First you need to get into the console mode. On some ChromeOS systems/devices this requires to enable the developer mode first.
How this is done differs from device to device, here's a list with links to instructions: http://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices
General information on how to access console/terminal and other related info can be found at: http://www.chromium.org/chromium-os/poking-around-your-chrome-os-device

Now you have 2 options to get into the console mode. Which one you use, does not matter.

Option 1: Console mode:
To get into the console mode, try either
  • CTRL+ALT+F2 or
  • CTRL+ALT+RIGHTARROW
You should now get asked for a username and password.
If you didn't change any usernames/passwords of the system before, try:
  • User: chronos   Password: facepunch
  • Other possible usernames and passwords: chronos, chroneos, chrome, chromeos, facepunch


Option 2: Terminal mode:
To create a new terminal mode window, hit
  • CTRL+ALT+T
You should see this:
crosh>
Here, enter "shell"



You're now logged in with a restricted user account.
The next step is to get root access.
Enter: "sudo su"
You should now get asked to select a root password. Make sure to write it down somewhere, in case you forget it!
Now is the time to connect to the VPN.
You'll need the *.ovpn config files of the serves you'd like to connect to. Get them from
You can of course download them from your normal desktop
and put them into a specific folder where you can find them later.
To leave the console mode, hit CTRL+ALT+F1 or CTRL+ALT+LEFTARROW
to leave the terminal mode, hit ALT+TAB
To download a config file from the console/terminal mode, you could enter e.g.
"wget http://hidemyass.com/vpn-config/UDP/Bulgaria.Sofia.UDP.ovpn"
Now the file has been saved into the folder you're currently in.

That said, as long as you're in a folder that contains the *.ovpn config files within the console mode,
you can simply connect to the VPN by running:
"openvpn Bulgaria.Sofia.UDP.ovpn"
You'll then get asked for your HMA! Pro VPN username + password (the same that you use to login to the VPN control panel), and the client will connect.
Once the client shows you something like
"Sun Apr 21 07:45:21 2013  Initialization Sequence Completed",
that means you are successfully connected and you can go back to your normal desktop.

To leave the console mode, hit CTRL+ALT+F1 or CTRL+ALT+LEFTARROW
to leave the terminal mode, hit ALT+TAB

To confirm that you are successfully connected, you could e.g. browse to http://ipaddress.com
and verify your IP, ISP and location.

To disconnect from the VPN, go back to console mode (CTRL+ALT+F2 or CTRL+ALT+RIGHTARROW, for terminal mode just ALT+TAB )
and hit CTRL+C.

No comments:

Post a Comment