Difference between revisions of "Ipvanish VPN"

From Amahi Wiki
Jump to: navigation, search
 
(18 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
<br>We are going to connect your HDA through a VPN tunnel to Ipvanish's servers. We will ssh into your HDA, show your current IP addresses Geo location and then connect to Ipvanish's servers and show the geolocation again. I will also introduce you to ways on how to check that your HDA is definitely connected by using a shell based text browser called lynx. Connecting is not a problem as such. I have yet to find a clean way to disconnect the VPN tunnel. in the last part of this tutorial we will disconnect from the VPN tunnel manually ( the hard way).  
 
<br>We are going to connect your HDA through a VPN tunnel to Ipvanish's servers. We will ssh into your HDA, show your current IP addresses Geo location and then connect to Ipvanish's servers and show the geolocation again. I will also introduce you to ways on how to check that your HDA is definitely connected by using a shell based text browser called lynx. Connecting is not a problem as such. I have yet to find a clean way to disconnect the VPN tunnel. in the last part of this tutorial we will disconnect from the VPN tunnel manually ( the hard way).  
  
== what is Ipvanish ==
+
== What is Ipvanish ==
Ipvanish is a service that allows you to connect through a secure VPN tunnel and change your locations IP address. this is in particular useful if you need to browse something that is not accessible for your country location. read more about IPvanish here [https://ipvanish.com]
+
Ipvanish is a service that allows you to connect through a secure VPN tunnel and change your locations IP address. this is in particular useful if you need to browse something that is not accessible for your country location. read more about IPvanish [https://ipvanish.com here]
  
 
== Prerequisites ==
 
== Prerequisites ==
- This tutorial assumes that you are running your Amahi HDA headless on version 9 based on fedora 23. Installation instructions can be found here [https://wiki.amahi.org/index.php/Amahi_9_Install]
+
- This tutorial assumes that you are running your Amahi HDA headless on version 9 based on fedora 23. Installation instructions can be found [https://wiki.amahi.org/index.php/Amahi_9_Install here]
<br>- You have Openvpn server installed. ( for this tutorial we purchased the amahi app for openvpn). can be purchased here [https://www.amahi.org/apps/openvpn]
+
<br>- You have Openvpn server installed. ( for this tutorial we purchased the amahi app for openvpn). can be purchased [https://www.amahi.org/apps/openvpn here]
 
<br>- Please understand that this tutorial is not perfect as closing the VPN tunnel still requires some manual work.
 
<br>- Please understand that this tutorial is not perfect as closing the VPN tunnel still requires some manual work.
 
<br>- I am currently working on a shell script that will allow you to connect , show the status of your geolocation and disconnect.
 
<br>- I am currently working on a shell script that will allow you to connect , show the status of your geolocation and disconnect.
  
 
== Getting  your config files ==
 
== Getting  your config files ==
<p>You will need to browse on another computer to the location of Ipvanish's config files and decide which location config file you would like to use. please see here http://www.ipvanish.com/software/configs/
+
<p>You will need to browse on another computer to the location of Ipvanish's config files and decide which location config file you would like to use. please see [http://www.ipvanish.com/software/configs/ here ]
 
<br> For this example I have used ipvanish-NL-Amsterdam-ams-a17.ovpn. You will also need the certificate file ca.ipvanish.com.crt     
 
<br> For this example I have used ipvanish-NL-Amsterdam-ams-a17.ovpn. You will also need the certificate file ca.ipvanish.com.crt     
 
<br>
 
<br>
Line 24: Line 24:
 
<br><code> cd ipvanish</code><br>
 
<br><code> cd ipvanish</code><br>
 
<br> now lets download the files  
 
<br> now lets download the files  
<br><code>wget http://www.ipvanish.com/software/configs/ca.ipvanish.com.crt </code>
+
<br><code>wget <nowiki>http://www.ipvanish.com/software/configs/ca.ipvanish.com.crt</nowiki></code>
<br><code>wget http://www.ipvanish.com/software/configs/ipvanish-NL-Amsterdam-ams-a17.ovpn</code>
+
<br><code>wget <nowiki>http://www.ipvanish.com/software/configs/ipvanish-NL-Amsterdam-ams-a17.ovpn</nowiki></code>
  
 
== Connecting to your VPN ==
 
== Connecting to your VPN ==
Line 65: Line 65:
 
</code>
 
</code>
  
<p>-The second way you can confirm that you are connected to Ipvanish VPN is Using a terminal based text browser Lynx</p>
+
<br>- The second way you can confirm that you are connected to Ipvanish VPN is Using a terminal based text browser Lynx.
If the site is blocked by your ISP's warning message using Lynx we can browse and see the warning message. Once connected to Ipvanish VPN you can browse the blocked website again and see that the warning message is no longer there and you can visit the site.
+
<br>If the site is blocked by your ISP's warning message using Lynx we can browse and see the warning message. Once connected to Ipvanish VPN you can browse the blocked website again and see that the warning message is no longer there and you can visit the site.
<p>Lynx is not installed by default so we will have to install this application</p>
+
</p>Lynx is not installed by default so we will have to install this application
  
 
issue the following command  
 
issue the following command  
Line 73: Line 73:
 
<p>Once the application is installed you can browse the web using your shell terminal as follows
 
<p>Once the application is installed you can browse the web using your shell terminal as follows
  
issue the following command <code> lynx http://www.google.com </code>
+
<br>Issue the following command <code> lynx <nowiki>http://www.google.com</nowiki></code>
<br> ofcourse google is not on anyone's blocked list. So please check here [https://en.wikipedia.org/wiki/List_of_websites_blocked_in_the_United_Kingdom] for sites that are blocked by ISP's and confirm that you an browse them without any block message
+
<br><br> of course google is not on anyone's blocked list. So please check [https://en.wikipedia.org/wiki/List_of_websites_blocked_in_the_United_Kingdom here] for sites that are blocked by ISP's and confirm that you can browse them without any block message.
 +
 
 +
<br><br> - Alternatively you can always logon to your Amahi control panel <nowiki>https://www.amahi.org/users</nowiki> and under the section Alerts you can see that your Wan IP address of your HDA has changed.
 +
 
 +
== Disconnecting Ipvanish VPN ==
 +
As mentioned before disconnecting the VPN tunnel is a little troublesome as it doesn't disconnect in an easy way.
 +
<br> we need to find the VPN tunnel connection and then using a Kill command stop it
 +
 
 +
<br> Issue the following command in your shell console
 +
<br><code>ifconfig</code>
 +
<br>look out for a connection named tun0 or tun1 that looks like this <POINTOPOINT,NOARP,MULTICAST>.
 +
</p> once we have identified the connection we simply kill it by issuing the following command
 +
<code>sudo ifconfig tun0 down</code>
 +
<br> or
 +
<br><code>sudo ifconfig tun1 down</code>
 +
 
 +
<br> Using the section above 'Confirming your Ipvanish VPN connection' you will be able to check that you are back on your ISP's wan IP.

Latest revision as of 17:33, 15 June 2016

Below you will find a guide on how to connect your Amahi server HDA as a client to Ipvanish VPN.
We are going to connect your HDA through a VPN tunnel to Ipvanish's servers. We will ssh into your HDA, show your current IP addresses Geo location and then connect to Ipvanish's servers and show the geolocation again. I will also introduce you to ways on how to check that your HDA is definitely connected by using a shell based text browser called lynx. Connecting is not a problem as such. I have yet to find a clean way to disconnect the VPN tunnel. in the last part of this tutorial we will disconnect from the VPN tunnel manually ( the hard way).

What is Ipvanish

Ipvanish is a service that allows you to connect through a secure VPN tunnel and change your locations IP address. this is in particular useful if you need to browse something that is not accessible for your country location. read more about IPvanish here

Prerequisites

- This tutorial assumes that you are running your Amahi HDA headless on version 9 based on fedora 23. Installation instructions can be found here
- You have Openvpn server installed. ( for this tutorial we purchased the amahi app for openvpn). can be purchased here
- Please understand that this tutorial is not perfect as closing the VPN tunnel still requires some manual work.
- I am currently working on a shell script that will allow you to connect , show the status of your geolocation and disconnect.

Getting your config files

You will need to browse on another computer to the location of Ipvanish's config files and decide which location config file you would like to use. please see here
For this example I have used ipvanish-NL-Amsterdam-ams-a17.ovpn. You will also need the certificate file ca.ipvanish.com.crt

lets ssh into our HDA server and get these files.
open a terminal window using putty or for linux or mac just use terminal.

ssh username@your_hda_ip_adress
replace ssh username with your HDA login credentials and your_hda_ip_address with the ip address of your HDA

After inputting your password you should be in your username folder. In this folder we are going to create a new folder and then change directory to this folder. We will store the config files here
mkdir ipvanish
cd ipvanish

now lets download the files
wget http://www.ipvanish.com/software/configs/ca.ipvanish.com.crt
wget http://www.ipvanish.com/software/configs/ipvanish-NL-Amsterdam-ams-a17.ovpn

Connecting to your VPN

If you have followed the above steps you should have successfully downloaded the config files and we are ready to connect.

issue the following command
sudo openvpn --config ipvanish-NL-Amsterdam-ams-a17.ovpn.
of course replace your server config name with the one you have chosen.
You will be firstly asked to input your HDA's super user password and then the script will run. At some point during the script you will be prompted for your Ipvanish username and password.

You are now connected. The shell window will show a bunch of code. you will not be able to enter any code to it. Just close the Shell window.

Confirming your Ipvanish VPN connection

There are a couple ways to check wether your connection to Ipvanish's servers has really happened. I will show you a couple ways below

- Using freegeoip.net

firstly lets get our wan IP address.
Issue the following command whilst logged into shell.
dig +short myip.opendns.com @resolver1.opendns.com

this will show you you current wan IP address.
in the example above it shows 81.171.81.95

Using freegeoip.net we are going to see what the location of this IP address is by issuing the following command
curl freegeoip.net/xml/81.171.81.95
this will display the location of the server and you will see that you are now connected through a different country.

<Response>
<IP>81.171.81.95</IP>
<CountryCode>US</CountryCode>
<CountryName>United States</CountryName>
<RegionCode>NY</RegionCode>
<RegionName>New York</RegionName>
<City>New York</City>
<ZipCode>10118</ZipCode>
<TimeZone>America/New_York</TimeZone>
<Latitude>40.7143</Latitude>
<Longitude>-74.006</Longitude>
<MetroCode>501</MetroCode>
</Response>


- The second way you can confirm that you are connected to Ipvanish VPN is Using a terminal based text browser Lynx.
If the site is blocked by your ISP's warning message using Lynx we can browse and see the warning message. Once connected to Ipvanish VPN you can browse the blocked website again and see that the warning message is no longer there and you can visit the site.

Lynx is not installed by default so we will have to install this application

issue the following command
sudo dnf install lynx

Once the application is installed you can browse the web using your shell terminal as follows
Issue the following command lynx http://www.google.com

of course google is not on anyone's blocked list. So please check here for sites that are blocked by ISP's and confirm that you can browse them without any block message.

- Alternatively you can always logon to your Amahi control panel https://www.amahi.org/users and under the section Alerts you can see that your Wan IP address of your HDA has changed.

Disconnecting Ipvanish VPN

As mentioned before disconnecting the VPN tunnel is a little troublesome as it doesn't disconnect in an easy way.
we need to find the VPN tunnel connection and then using a Kill command stop it


Issue the following command in your shell console
ifconfig
look out for a connection named tun0 or tun1 that looks like this <POINTOPOINT,NOARP,MULTICAST>.

once we have identified the connection we simply kill it by issuing the following command

sudo ifconfig tun0 down
or
sudo ifconfig tun1 down


Using the section above 'Confirming your Ipvanish VPN connection' you will be able to check that you are back on your ISP's wan IP.