This guide was made primarily for the ArchLinux distribution but it should work with some modifications on other systems also.
The goal here is to connect to the free VPN ItsHidden.com and route all traffic through it on a Linux box (other PPTP VPN services should work also).
Most information is taken from the ArchLinux wiki and http://pptpclient.sourceforge.net/routing.phtml.
I. Configuring the connection (you need to do this only once)
First, you need to make sure that you have the pptpclient package installed. If you don't have it or you are not sure, just run:
sudo pacman -S pptpclient
Next you should make sure that your firewall accepts connections to ports 47 and 1723.
Now you need to create the appropriate configuration files for your connection - edit the file /etc/ppp/chap-secrets, for example with the following command :
sudo vim /etc/ppp/chap-secrets
(replace vim with your favorite editor, some other examples are nano, emacs, gedit...)
In this file, you need to append a line containing the following:
Username vpn.itshidden.com Password *
Replace Username with the username you received from ItsHidden.com and same for the password. Then save the file, and chmod it to 600 since you entered pretty sensitive information in it:
sudo chmod 600 /etc/ppp/chap-secrets
Next you need to create a directory in which your configuration files will be stored:
sudo mkdir /etc/ppp/peers
Note: it's fine if the shell tells you that the directory already exists.
We are almost done now!
The last step is to create a configuration file for your ItsHidden VPN connection:
sudo vim /etc/ppp/peers/ItsHidden
(again you can replace vim with your favorite editor)
Insert the following in the file:
pty "pptp vpn.itshidden.com --nolaunchpppd"
Make sure you that you replace Username with your ItsHidden username. Then save the file.
Now you are ready to go!
II. Connecting (do this every time you want to connect to the VPN)
To connect to the VPN server, simply type:
sudo pon ItsHidden
from a command-line.
Provided that everything works correctly (you can check /var/log/daemon.log by typing sudo tail /var/log/daemon.log for possible errors), you should now have a new network interface: ppp0. To test this type:
If no error is returned then you are connected. The last step you need to make now is to tell your computer to route all the traffic through the VPN tunnel (otherwise, your existing internet connection will be used).
To do this, enter the following commands:
sudo route del default PRIMARY
sudo route add default dev ppp0
Make sure you replace PRIMARY with the interface you use to connect to the internet normally (usually eth0 or wlan0, for wired and wireless respectively).
Now you should be connected! You can try to access ip.houbysoft.com and you should see a different IP from your usual one.
To disconnect from the tunnel, issue the following command:
sudo poff ItsHidden
Then restore your default route, and you should be back to your normal internet connection.