VPN services

VPN services are offered by several companies. They allow users to protect their privacy and security while using the Internet. Guides to using various service providers on Gentoo are below.

Private Internet Access
https://www.privateinternetaccess.com/

The following will auto-start openvpn upon boot:


 * 1) Buy a subscription and log in
 * 2) Go to https://www.privateinternetaccess.com/pages/client-control-panel and locate the "PPTP/L2TP/SOCKS Username and Password"
 * 3) Generate Username/Password if they are not there
 * 4) In the next step, replace USERNAME and PASSWORD with the located or generated ones.
 * 5) Download the privateinternetaccess configurations and certificates.
 * 6) Modify the configuration file and permissions.
 * 7) Start the service and add to default runlevel.
 * 1) Modify the configuration file and permissions.
 * 2) Start the service and add to default runlevel.

If Openvpn doesn't connect you would want to add www.privateinternetaccess.com's DNS servers to your file. Create '/etc/resolv.conf.head' file if it doesn't already exist, edit the file by adding the two DNS servers:

Go to www.privateinternetaccess.com's to make sure you entered the correct DNS servers: Save and Reboot.
 * Click on 'Client Support Tab' and scroll down to 'DNS leak protection' section

Free VPN
https://freevpn.me/


 * 1) Go to https://freevpn.me/accounts/ and click on "Download OpenVPN Certificate Bundle". You will get a zip file with the ovpn configuration files for all the Free VPN servers. .ovpn files are Openvpn configuration files with the client configuration at the beginning of the file, followed by inlined certificates. Choose one of these servers and copy the corresponding directory into  (You can use mc for that kind of task). I renamed the directory in order to get rid of the spaces in its name.
 * 2) On the website, click on the left menu to choose the server you want. When done click on "Accounts", as example https://freevpn.me/accounts/ . On that page, you can read the user and password needed for that server in the Open VPN section. In the console do, as example for freevpn.me using udp on port 40000:
 * 3) To not get prompted for the username and password:    and change the line:  into
 * 4) You can test it with:
 * 5) In order to run it at boot time, follow one of the methods described here: OpenVPN

Troubleshooting
It Openvpn fail to connect with something like: it can be a firewall blocking you, but other vpn servers will fails too in that case. It other vpn servers are working, just try another configuration file. At that time of writing, FreeVPN.me-UDP-53 fails with that error, but FreeVPN.me-UDP-40000 is running just fine.

Troubleshooting
The above setup requires that root has write permission on /etc/resolv.conf. To make sure this is the case run

If the output looks like this

than, since "i" means that the file has the immutable bit, not even the root can write on it. To change that just run

and reboot.

Windows L2TP/IPsec VPN
Users wishing to connect to their company's L2TP/IPsec network can follow the below guide. Assuming you are already running a gnome profile, follow these steps:

The USE flag modifications are necessary to bypass sepolicy issues with the charon daemon. These flags are not recommended if you're running an L2TP server (according to the ebuild).