Welcome back all
Today we're gonna go ahead and set up a VPN in
Kali Linux 2.0
I am using a virtual machine
If you're not it doesn't really matter
the procedure is pretty much the same
so it doesn't matter which operating system
is running as your host
I'm running a Fedora as my host but,
it doesn't really matter if it's Windows or Mac or whatever else
there might be out there,
completely irrelevant
just have a,
as long as the virtual machine is functional, it should work
Anyway, if you're using a virtual machine, go to devices,
and network, network settings and make sure that
these settings that we've talked about
are proper, so it doesn't necessarily need
to be in bridge mode, but I'm using bridge mode
I'm using a bridged adapter,
so here it says, name,
this is the interface that you are using
so no big deal, just take a look on your
host system which interface you are using
and then select here if you don't know,
if you're too lazy to check it,
they are usually or have maximum three or something like that,
maybe a little bit more, I'll just try one after another
if you can't really bother to check,
but
that should be, that should be pretty self-explanatory
I've talked about this in the previous tutorials
Anyway, in down, down in the ''Advanced''
make sure that the promiscuous mode is allowed all
and that is pretty much it, actually there isn't
that much else that you need to do,
just go ahead and click on ''ok''
So now that I have the virtual machine up and running
I'm gonna go ahead and open up the terminal
Let's go ahead and zoom in a little bit
and one of the very first things that we're going to do
is change our DNS settings because I've noticed that
people can't do and follow through certain things in the tutorial
because they're using some really weird DNS servers
and those DNS servers are basically blocking you
as they are doing traffic filtration or something like that
so if you do ''cat /etc/resolv.conf"
you can see which DNS servers you're using
so I'm using the one provided by my ISP
so I'm just choosing my router,
basically my home gateway,
you have 99% chance that this is the same,
that you have the same as mine
and this is basically forwarding the traffic to my ISP from where
from who has a DNS server and there I can actually get
my queries resolved, but
we don't really want that because there's a lot
I mean not always but certainly in a lot of cases
there's a lot of filtration on those DNS servers
so we will change that
Let's go ahead and just clear the screen and
type in "vim"
Let me see if vim is installed
it is
Excellent
"clear"
type in "vim /", actually you know what?
Let's just use nano, it'll be a lot simpler for you
"nano /etc/dhcp/dhclient.conf"
Press Enter
Scroll down with the mouse scroll or with an arrow
which way you prefer
And let's see where is that line
Ok, so, this one that says "prepend domain name servers"
Let's go ahead and remove that, delete that
and here we are going to type in our new name servers
so, what should it be?
Well I'll just go on to the net
No big deal
Also, you can choose a DNS server which is not in your own country
That is sometimes a good idea as well
I am going to use Open DNS, I have been using it and you're pretty good
and you're pretty safe
as far as I know and as far as my experience goes
so, open DNS, you definitely have other ones that are available
up there
Open DNS IP addresses
that's what we need
and there we go, so these are two IP addresses
which we are going to use
by the way if you're wondering how I am doing this
you know the button in Windows that you press for start?
It's in between Control and Alt, it has a Windows sign on it?
So if you press that button it's gonna split the screen
into multiple windows
that's something from the unix shell
so go ahead and paste one IP address here
then type in a coma and a space and then take the second IP address
and let's go back to the terminal
it's a virtual machine, in the real machine you can actually tap the upper left corner
twice or once with a mouse and this will happen as well
Ok, so, there we go
Control + O to save
Press Enter
and then press Control + X to exit
now we need to type in "service network-manager restart"
Now we're gonna do "cat /etc/resolv.conf"
and here we go
So I have this one, I have this one, and then I have the ISP down at the bottom
Now there's a way of removing this one at the bottom as well
but this is almost never going to get used
I mean the second one is almost is never going to get used
unless there's some load balancing on Open DNS and between the two IP addresses
but the third one, very, very rarely will it actually be used.
So, yeah, no worries there
If you want to be like 100% safe you can go back to this file
and then add a third address and then only those three will be used
because by default only three can be used
you can have one main and two file saves and I'm going to go ahead
and type in, I'm gonna go a used the Google one
but you can use whichever one you want
I'm just using an example here
I prefer to use Open DNS and you can definitely find some
fairly anonymous DNS servers out there on the net
please, please please, be careful
once you find a DNS server, go on to the forums and see what people have
been saying about those DNS servers.
What is their reputation like?
Do they protect, do they do something mischievous or something like that?
Is it like fake thing that just happen stumbled across the net
promising you a lot of things but delivering nothing
and just redirecting you to some advertisement site? or redirecting you
to malicious sites? so just be very careful with that and make sure
that you select the reputable ones
Anyway, just go ahead and press Control + O to save as before
Enter
Extracts it
and then we just need to restart the network manager again
no big deal, now we can go ahead and "cat /etc/resolv.conf"
and you can see that we have one, two, three, and you have a note
"the libc resolver may not support more than three nameservers"
"the nameservers listed below may not be recognized"
Actually they won't be recognized
Just list these three as an example, but you can take a DNS server from anywhere
on this planet earth, so for example, if you are in the U.S, if you are in Japan
or if you are in China or in Germany or something like that, you don't necessarily need to choose
a DNS server from that country, you can choose a DNS server from some other country
So if you're using a VPN or proxies, if you're using proxies specially
you don't want to afford any DNS, basically
somebody sees... I'm confusing you a little bit here
If you are using a proxy, then let's say that you are in France,
and then you are using a proxy from Germany, so it appears as
though your traffic is coming from Germany,
but your DNS server is still in France, so somebody might infer from that
that you are from France
Therefore, if you choose a DNS server in Germany as well
your proxy and your DNS both match Germany
but you can choose some DNS server from another country
Let's say: Finland, so you can have a Finnish DNS server and you can have a
german IP address on the net, that way somebody cannot conclude from which
country you are coming from and that is a pretty good thing
Another note is that DNS servers by default, they don't log queries
but , I mean, it would be a massive operation to log all the daily queries
maybe somebody does it, I don't know, I cannot guarantee it to you
I know that the DNS servers by default, the ones that you can install the DNS server and configure it
and then you will see that by default it doesn't log queries,
but you know, somebody might set it up, or something like that
might happen, so be very, very careful which DNS servers are you using
Use the ones that give have a good standing reputation and you can also
use the ones in countries which have a good standing reputation in terms of
respecting user privacy, for example, Netherlands is one very good example
Sweden as well, it's pretty good there and there are some European countries
and countries worldwide that I can't think of now at the moment but it doesn't really matter
you can look this up on the net, the information is widely available
so where, from which countries can you choose the DNS servers and which DNS servers
you choose, now I've also... I'm sorry, I'm sorry for making this lengthy,
but I do want to explain a couple of points here before I wrapped it up and then go into the VPN set up itself
Yeah, I have people before who stated that they had problems when they changed the DNS and then
they've changed the DNS and then they used the VPN and the DNS still shows that
their DNS is in the US, well yes, because the DNS server you selected
is actually from the US so if you choose another one from another country elsewhere in the world
it will just show that the DNS is in that country, so you actually don't have a DNS leak
it's just that IP address in that DNS server is physically located in the country
of your origin, so if you choose another one you will be fine
Anyway, in the follow-up tutorial, I'm running a little bit short of time
so in the follow-up tutorial we'll just gonna go ahead and continue with this
download the files we need to download and connect to the VPN service.