whether you're hoping to give yourself
a little extra privacy while you surf
the internet or you want to access
services that perhaps
aren't available typically in your area
or maybe it's a case of actually having
had your ip
address blocked by a service provider
it may not be a malicious thing i've had
my ip address blocked by youtube before
because i upload so many videos and
download
the closed captions for those so
that has led to me exceeding my usage in
the youtube api
so then my ip address gets blocked so
it doesn't have to be a malicious thing
i don't want to give that impression
but there are very legitimate reasons
to need to get around those types of
things and the nerds go to
is a proxy the problem is proxies
can be very expensive to use and the
free ones
while readily available are very often
either not very reliable they're up one
day they're down the next and you lose
access to your services
and everything else or even worse
they're dangerous you don't know what
those proxies are tracking
logging and even like intercepting
as you're going through you're sending
all of your internet traffic
through that service provider
so there's one person who i really trust
to proxy all of my data
and that's me i'm not the same person
that you would say that you trust
the person that you trust is you so i'm
going to show you how
i might set up a free proxy service
of my own and you can replicate that and
create your own as well
we're gonna do this in the cloud we are
gonna be using a third-party service
provider
and that's amazon so you say oh well
amazon what about
you know are we able to trust our data
to them well what we're using is their
cloud services it's called amazon
web services so it's all of their it's
their cloud
infrastructure that they have for
customers to basically rent
access to their servers and their their
space and
and the the virtual servers and
everything else that whole
infrastructure is available to you
but the deployment itself is
yours i'm going to show you how this is
done we're going to jump on to aws
and in particular ec2 so of course
you if you're not familiar with aws just
go to aws.amazon.com
sign in with your amazon account and
then do a quick search for
ec2 and that will take you into
basically their virtualization platform
think of ec2 as
just that so the first thing i note when
i'm here
in ec2 is my region and this is
important because this is where my proxy
server is going to reside
should i set it there why is that
important well think about this
let's say i'm using a video streaming
service that
restricts canadian access to their video
streaming service so
by placing my proxy server down in north
california
now all of a sudden they are basically
by ip address going to think that i'm
connecting from
california so i'm able to work around
that
similarly you may want to change your
region based on
what it is you're trying to achieve you
can even put a server in africa
or asia look at that you can put one
right in hong kong
you can put one in canada a uh in europe
you've got
all over the place and then we've got
middle east and south america right now
so
it's a pretty big list of where they
have this infrastructure set up for
amazon
web services the ec2 service so pick the
one that
is where you want your proxy server to
be
i'm going to set mine i'm just going to
leave it as north california which is
u.s
west one and that is where
my proxy server is going to reside
that's going to allow me to connect
as if i was actually sitting in
california
all right so i'm going to click on
launch instance
and then launch instance again because
it does a drop down and this gives me
a list of um operating systems that i
can deploy
on my ec2 instance so i'm using some
terms here you may not be familiar with
aws is amazon web services that's
basically
amazon's full gamut of services that
they offer
for cloud users ec2 is their
virtualization platform for virtual
machines
when i said instance i'm talking about a
virtual machine
so that is literally a virtual machine
so i'm going to deploy one of these
operating systems to an instance of ec2
which is
a virtual machine so what do i want it
to be
so and i was saying hey comment below if
i use a term that you're not familiar
with
i'm gonna do a quick search i've already
done it before because i deploy a ton of
servers
in the cloud i'm gonna click on debian
uh just type in debian into the search
here
so then i'm gonna go to aws
marketplace results there are also
ones that i've created and ones in the
community
you would think oh well i want to use
community ones well no you don't because
those ones are going to cost you money
and you say well but community is free
it's open source and yes
however it's um not a part of the aws
marketplace and so you're going to have
to pay for the usage
to have that virtual machine that
instance running
in the cloud so instead we're going to
use one of the official ones from the
aws marketplace let's see what results
we get they're sorted pretty well
debian comes up the first result is
debian 10 buster
a free tier compatible or free tier
eligible
version of debian that we're going to be
deploying so select that
free tier eligible so we can ignore the
pricing because we are going to use a
free tier hit continue
and this is where we select that so well
if we want the free tier we've got to go
with a t2 micro so
i'm going to select that but what does
it give us it gives us one cpu
one gigabyte of memory um
and then we've got storage to deal with
we don't need a lot of storage because
we're just setting up a basic proxy
and that's about it so i'm going to
deploy just as
that so t2 micro is the one that's free
tier
eligible don't select one of the bigger
ones because you're going to be paying
for it
right away i'm going to review and
launch we're going to come back to do
settings like our security groups and
things like that i'm just going to leave
everything
by default for now and we're going to
launch that so
first of all i need to create a new key
pair so this is
the ssh key that i'm going to use in
order to ssh into
this server so i'm going to call this
one proxy
server and then download my key pair
make sure you save that somewhere safe
i'm going to
throw that onto my server and drop that
there
and now launch instance means power
on your virtual machine so i'm going to
push that
and there we go so it's basically
creating it is creating a virtual
machine
an ec2 instance in the cloud for us in
uh in northern california so there we go
so
i'm going to view instances down here
and now i can see i now have one
instance running a t2 micro
and it is just no name so i'm going to
click on edit and i'm going to call this
my proxy server
server try that there we go okay so it's
already up and running
so if i click on that i can see the ip
address of that server it is i've called
it proxy server but right now
remember it's just debian 10. there's
nothing else installed on it
so i need to copy that ip address
and then i'm going to jump into my
command prompt
because i downloaded the key to my
server i'm personally going to
ssh to my in-house server
alright so now i'm there so now the
command that i'm going to use
is ssh and then dash
i for the key that i'm going to be using
so the incoming file
that i'm going to be using for the key
and that one is called
proxy server.pem is what i downloaded
then i'm going to go admin because
that's the default login for the debian
ami
or amazon machine image admin at
and then the ip address that i've
already copied to my clipboard and if i
hit enter
it's going to ask me to accept that key
and i say yes and
i am denied
permissions on that file ended up being
note that
766 so everyone has access to those
files so that's interesting
ssh itself is protecting me from
somebody being able to compromise my key
so chmod 7 0 0
proxy server dot pam let's try that and
now try again
so what i've done is oh and now i'm
connected it just worked
seven zero zero means i the owner of
that key
i'm allowed to do anything with it
read write execute zero zero means
nobody in the group nobody that is not a
part of the group
is allowed to access that at all so it's
basically a dumb file that they can't
even open
uh but i can all right so now that i'm
connected i'm gonna go sudo sue
because that's what the command is to
become root so now i am root so apt
update apt update is gonna
grab my repositories you see this is a
an actual
debian computer if you will in the cloud
it's that easy i'm already upgrading i'm
already
running a debian computer in the cloud
so in that amount of time and i'm blah
blah blah at the same time
um we've got a cloud-based debian server
did you did you realize it was that easy
and it's free
okay so we can do other things with this
too we could set up a lamp stack we
could use it for mysql mariadb
anything you can come up with it's a
debian server so
we're going to be using this as our
proxy so now what i'm going to do
is i'm going to install a tool called
tiny proxy nice and simple to install
apt install tiny proxy
really simple to configure say yes
here we go
and it's done now that we've installed
tiny proxy we just need to edit
the config file so slash etc slash
tiny tiny proxy changed her into that
and then i'm using nano tinyproxy.com
and edit that so control w in nano
allows me to search
oh but before i do search note that the
port by default is using
8888 we're going to need to know that
information because that
is what we're going to connect to for
our proxy do a quick search for allow
alt w allows you to search again wow the
word allow is probably not the best
search query maybe search for 127.0.0.1
um and just below that one i'm going to
allow and then i need to add my ip
address so that i can connect to this
proxy server because right now it's
closed down only localhost can access it
that's important to note
that this is while this is a public free
proxy server i'm the only one who's
going to be allowed to access it that's
going to be allowed to
proxy my content my connection through
it so it is
private in that regard i need to know my
ip address so i'm going to jump over to
currentip.xyz
and copy that ip address to my clipboard
and then jump back there and paste it
into my config
control o enter control x control o is
to write out
save the file now system ctl
restart tiny proxy
almost done the final thing that we need
to do is we just need to tell aws
the ec2 security that
we're going to set up a policy that says
hey only i am allowed to connect to that
server
so nobody else can connect to it
whatsoever so that's what we're going to
do right now so i'm going to jump back
here and you see this server up on the
screen
well if i click on security i can then
click on the security group that it is
assigned automatically so just click
that
and now it has left me over to ec2
security groups and the correct security
group
you'll notice that it's already set up
one for ssh because
it's by default enabled i can set that
to only allow me as well which is
important so
let's do that just to be in good
security practices so
ssh i'm going to change it from
custom0000
i'm going to close x that and then
change it to my ip
then i'm going to add a new rule you saw
how i got here right i know i'm moving
really really fast
i've just clicked on edit inbound rules
over here
okay so add a new rule custom tcp is the
default
port number do you remember 888 and only
allow my ip i can call it something if i
want
proxy and then save my rules
there we go so now you see ssh and
custom tcp
one called proxy on port 8888
so how do we test this okay so our
current ip address is 99.233
and so i'm going to connect to the proxy
this is
not a tutorial on how to use a proxy
this is not a
tutorial on what to use it for
necessarily this is
this i'm making assumptions here that
you can either google it yourself
because it's going to be different based
on your use case whether you want to
just proxy your browser or proxy
particular application or your entire
network
that's going to be up to your individual
use case this is
strictly a tutorial on how to build this
ec2 instance really really quickly for
free
that has a proxy ready for us to use in
california or wherever
and uh that's that's it so in my
particular case right now
so this moment is not necessarily what
you want to do next
this is just how i am going to test the
proxy i happen to be on windows 10 here
so i'm going to simply type in proxy
and go into proxy settings again this is
probably not how you want to do it
i just want to test so i'm going to turn
on proxy
i can see that there's an old proxy
settings there so make sure you're
mindful of that
if there are old proxy settings you need
to change it go to
instances on ec2 click on your instance
id
and grab that ip address and then paste
that in
as the address for your proxy server
port 8888
and save so now i'm connected to the
proxy instantly
not connected to now windows is saying
i'm going to route all your traffic
through the proxy i should correct
myself there
so if i go back to currentip.xyz
99.233 is my current ip i'm going to hit
f5 to refresh
and if all went well 3.101.108.211. well
what is that
that's my server so i am
actually now where am i let's find out
maxmind.com let's do a search for
the ip address that i'm currently on
where am i san jose california
that's where max mine determines me to
be so
that's all there is to it folks we have
created
configured deployed a free proxy service
that
we own and operate we're the only ones
who has that
who have that ssh key so if you want to
connect in make changes use it
as a multi-purpose server you can do
that um but just keep an eye on your
your billing stuff just make sure that
you haven't exceeded thresholds and
things like that
if you're just using it as a proxy it's
very unlikely you're going to do that
it's just something that you're piping
data through
so check that out it's aws.amazon.com to
get yourself started
if you have questions post them to our
community head on over
to our discord you'll find the link at
category5.tv
on the interact menu in the meantime if
you enjoyed this if you've used it or
found it useful give me a big thumbs up
please subscribe
[Music]
do
[Music]