Previously, we've seen how easy it is to connect to a VPN server if the provider offers a VPN client.
As I said earlier, most VPN providers do not support Thales.
Therefore, if you want to connect to a VPN from Thales and your provider does not support Thales,
you'll have to manually modify the firewall settings, install the needed software and connect to the
VPN server that you want to connect to.
So in this lecture, I'm going to show you how to do that so that you can connect to any VPN server
from Thales.
Please keep in mind, like I said earlier, connecting to a VPN from Thales is optional.
This is not a required step because as we know, Thales automatically forces all traffic to go through
the Tor network.
Therefore, by default it is more private and more anonymous than most operating systems.
So the main thing that I'm actually going to be showing you in this lecture is how to configure Thales
so that it redirects data to our VPN provider and then connect to this VPN provider.
So let's go to Thales.
As you can see here, I haven't even logged in yet.
Before doing that, you need to add an admin account.
So I showed you how to do that before we're going to click on the plus and we're going to click on the
administrator password.
And we're just going to set an admin password so that we can execute commands with admin privileges.
We're going to click on Add to add it and then we're going to start Thales.
Now, once your insight tells I'm going to go and start my terminal, so we're going to go to applications
and run the terminal from here.
This is basically a program that allows us to execute commands on the system.
I know it sounds a little bit scary, but don't worry, I'm going to walk you through it.
And the first thing I want to do is change my privileges to admin privileges, because I'm going to
be modifying the system settings and I'm going to be installing additional software.
Therefore, I need to be admin for this.
So to change our permissions to admin, we're going to do sudo su.
It's going to ask you for the admin password.
So I'm going to put the password that I just said at the start of the video.
Now, if you notice at the start, I was saying amnesia, which is the user that we were using at amnesia,
but now it's saying root at amnesia, meaning that we're going to be executing commands as root.
Root is the admin user account on the system.
So I'm going to clear the screen and the first command that I want to run is a command to install OpenVPN.
OpenVPN is a program that we're going to use in order to connect to our VPN server, regardless of what
VPN provider you're using, whether you're using NORD or any other VPN provider, it doesn't really
matter.
You can use open VPN with all of them.
So the first thing that we need to do is install this program on Thales.
And to do that, all we have to do is do apt get this is the program entails that we can use to install
other programs and what we want to do is install and the program that we want to install is called Open
VPN.
So apt get is a program that we use to install other programs.
Install is what we want to do.
We want to install another program and the program that we want to install is called OpenVPN.
I'm going to hit enter.
And this is telling me, do I really want to do this?
I'm going to say yes.
So I'm going to type Y from my keyboard and hit Enter.
And perfect.
Now OpenVPN is installed, as you can see in here.
Now you can see the notification that we have right now.
It's asking us if I want to install this program only once or install every time.
If you click on install every time, Thales will install this program.
Every time you start Thales because as we know, Thales this amnesic.
So if you pick install only once, it will only be installed for the session.
If you restart the computer, it will be removed.
So I'm going to click on install every time and this way, every time I start Thales, it will automatically
install openvpn for me and I'll be able to use it without doing the apt get command that we just did.
So now that we have OpenVPN installed, we're actually ready to go and connect to our VPN.
But before doing that, you need to go ahead and download the configuration files of your VPN.
Now you need to get these from your VPN provider.
Most VPN providers will give you that.
The process of doing that is different.
You might even need to communicate with them.
But right now, I already have them downloaded in my Tor browser persistent directory.
And here these are the configuration files that I need for my VPN provider to connect using openvpn.
The main file which is the config file is the file with the dot VPN extension.
If I double click this file, you'll see the open VPN configurations and all you need to do is basically
run open VPN.
The program that we just installed and tell it to use the configuration in this config file.
This will work on any system.
You can even do it from Windows or Linux, but it won't work from Thales because like I said earlier,
Thales is configured to force all traffic through the Tor network.
So before doing that, before trying to connect to our VPN, we need to modify the firewall settings
so that all data is forced to go through the VPN first and then go to the Tor network.
So to do that, I'm going to open the configuration file for the firewall.
So I'm going to go back to my terminal and I'm going to do G, edit, g, edit is a text editor.
So I'm basically saying I want to use a text editor to open a text file.
And the text file that I want to open is the text file that controls the firewall in tails.
So the that text file is stored in ETSI firm and the name of the text file is from dot com.
So we're doing G.
EDIT Because that's the text editor that we want to use and we're telling it we want to edit the following
file.
If I hit Enter, this will open the file for me, as you can see in here and what we want to do.
Like I said, we want to add an exception for the VPN server that we want to connect to.
So I'm going to scroll down and I'm going to look for where it says White List Access to local resources.
And in here, we're going to add the information of this server that we want to connect to.
We can get this information from here from the config file.
Like I said, this is the file with the dot VPN extension.
So the first thing we're going to do is type the ADR to specify the IP of the VPN server that we want
to connect to.
And we can get that from the config file.
It's after the remote in here, so we have it right here.
I'm just going to copy this and paste it here.
Then we're going to need to specify the protocol.
So I'm going to type protocol followed by the protocol.
Again, looking at the config file, we can see the protocol is UDP.
So again, we're just going to type UDP in here.
Then we need to specify the port.
So we're going to type the port again.
We're going to get that from the config file, from the remote entry.
So the remote contains the IP followed by the port.
So we can see the port here.
It's 1191 again.
We go back here, 1191.
And we're going to say for this specific IP with this specific protocol, with this port, I want you
to allow the admin user, the root user, to do anything.
So we're going to open two curly brackets and we're going to say mod owner, the UID of the owner is
root.
Like I said, root is the admin and Linux.
And we're going to say we want to accept all connections that this user does to this specific IP with
this specific protocol, with this specific port.
The next thing that we need to do is redirect and force all traffic to go through this VPN server so
that anything that the operating system does will have to flow this way and that way.
It is very difficult for other programs to access the Internet directly and therefore leak information
about our real IP and real identity.
So to do that, we're going to scroll down.
To where it says Thor is allowed to do anything it wants to do.
We're going to say this can only be valid if the outer phase, so the interface in which data flows
through is t, u and zero.
Now t you and zero is a virtual interface that doesn't exist right now.
It will be created once we connect to the VPN server.
And what we're doing right now in here is forcing all traffic to go through this interface that will
be creating the encrypted tunnel between our computer and the VPN server.
So that's it right now.
First of all, we added a rule to allow Thales to connect to the VPN server.
And second, we configured the firewall to force all traffic to go through the connection of this VPN
server.
So I'm going to do control as to save this, and we're going to do control queue to quit the file.
We're also done with the config.
So I'm going to close it in here and I'm going to clear my screen.
And right now we just have to do one more thing before connecting to the VPN server, which is restarting
our firewall for these changes to take effect.
To do that, we're going to do ETSI and IT the firm, which is the name of my firewall and we're going
to say I want to restart this firewall.
We're going to hit enter.
And if you fail at this stage, it means that you misconfigured one of the rules.
So please just revise the video and make sure you set up the rules exactly like I did.
As you can see, I was able to restart it with no issues at all.
Therefore, right now I am ready to go ahead and connect to my VPN server.
Now, before doing that, let me just show you right here.
As you can see, the configuration files are stored in my home persistent tor browser, so I need to
navigate to this location before being able to use these files.
So we're going to use the CD command to change my current working directory to this directory.
So we're going to do CD followed by Persistent.
And you can use the tap to autocomplete, for example.
I'm just going to type T, o, r and press tab to autocomplete tor browser.
If I hit enter, you'll see that I am inside the correct path right now.
Same path as you see in here.
Therefore, right now I can go ahead and use this file to connect to my VPN server.
So we're going to use the program open VPN that we installed at the start of the video.
So we're going to do OpenVPN dash dash config to specify the config file.
And again, as you can see in my case, the config file right here is called config dot VPN.
In your case, it might be called something else, but the config file is always the file that ends
with dot VPN.
So I'm going to type config dot VPN and before I hit enter, just going to go over the command.
We're using open VPN.
This is the program that will allow us to connect to our VPN server.
We're doing the dash config to specify the config file and my config file is called config dot VPN.
I'm going to hit enter.
And as you can see, it's going to ask me for the password.
This is your password to connect to your VPN server, not the password of the system.
So I'm going to input mine right now.
Hit enter and perfect.
If you see initialization sequence completed, this means that the connection has been established.
Now you will also notice that the onion icon in here will have an ex as if you're not connected to anything.
Don't worry about this.
You're seeing that because right now the traffic is forced to go through the VPN server, like I said.
And that's why the system thinks that it's not connected, but it is actually connected to the VPN server.
To confirm this, I'm going to go and run my tor browser.
And I'm just going to go to check the tor project dot org.
And perfect.
As you can see, it's still enough that my browser right now is configured to use the Tor browser.
So right now what's happening is we're connecting to the VPN first and then our traffic is routed to
the Tor network.
And then, like I said, we can bounce through three nodes and then go to the internet or stay within
the Tor network and access onion hidden services.
Now just to make sure that this is the way our computer is set up and it can't access the Tor network
directly or the Internet directly.
What I'm going to do in here, I'm just going to go back to my terminal window and I'm going to press
control and see to quit the running program right here and now.
If I go back to my Tor browser and refresh the page, you will see that I do not have connection.
And that is perfect because what I just did right now, I disconnected from the VPN server and because
I did that, I can't access anything.
And this is exactly what we want.
We want our computer to be configured in a way that it forces all traffic through the VPN server.
If you want to go back to the previous configuration where traffic is forced through the Tor network
directly, all you have to do is simply restart.
Tails.
Tails is amnesic.
All of these configurations will disappear and you will be connecting to the Tor network directly as
usual.
Now this could be a feature and can be something annoying if you always want to connect to a VPN because
every time you restart Thales you will have to do this.
You'll have to do all of the steps that I showed you previously in order to connect your VPN provider,
because your settings will be reset every time you restart.