Published June 2, 2023, 9:20 p.m. by Monica Louis
Today we're going to be showing how to access your home computers, servers, etc from anywhere in the world! This can also be used to protect your personal data in places with public WiFi!
Raspberry Pi (Device): https://www.raspberrypi.org/products/
PuTTY: https://www.chiark.greenend.org.uk/~sgtatham/putty/
OpenVPN Client: https://openvpn.net/community-downloads/
Setting up Dynamic DNS: https://www.youtube.com/watch?v=EH8wJt81bqg
Portforwarding Documentation Site: https://portforward.com/
**Make sure you change your Pi’s default password! People can try to access your Pi since it’s port forwarded.**
● I REPLY to COMMENTS! Be AWESOME and drop a LIKE!
You may also like to read about:
you guys what's going on it's Shane and
today I'm going to show you how to
access your home network from anywhere
in the world now you can use this for a
lot of things you can access a server
that you have on your network you can be
able to access your computer in case you
forget a file that you need for
something and it also just gives you a
way to protect yourself online when
you're out in public because you're
using your home connection to access
these websites rather than the coffee
shops connection or wherever you happen
to be it's really cool and it's really
cheap so I'm gonna show you how to set
it up to get started we're gonna need a
few things on the hardware side so first
we're gonna need a Raspberry Pi I have
the model B however any should work and
if you want the case that I have online
I'll leave a link in the description
below and then you're also going to need
an Ethernet cable now to get our pipe up
and going what we're gonna do is we're
gonna connect the power cable to a wall
socket and then we're going to take the
ethernet cable and we're going to plug
that into the Ethernet port on our PI
Ethernet just gives better reliability
and better speeds you could use Wi-Fi
but I would recommend against it just
because the connection isn't as great
but once you connect with Ethernet
you're gonna take the other side and
just plug it directly into your router
now the soft we're gonna be using on our
PI is called pi VPN it's a open-source
project and it basically just turns our
PI into a open VPN server and it makes
it super easy to set up so I'm gonna go
swap over to the computer and we're
gonna show you how to get it going to
get this setup we're gonna need a couple
of programs the first of which is the
open VPN client this is what we're gonna
be using on our desktop to connect to
our server and they also have a mobile
app as well this is how we're gonna use
it to join we're also going to need pi
VPN which is what we're gonna be running
on a Raspberry Pi to give us the VPN
server and then you're also going to
need FileZilla just to access the files
and then putty to connect to our server
I'll have links for everything down in
the description below so you don't have
to go hunting for it all the links will
be there but make sure all of these are
installed with the exception of pi VPN
because i'm gonna be showing you how to
do that right now but as long as these
three are installed on your computer we
can get started so we're gonna open up
putty and if you don't know the IP
address of your Raspberry Pi you can
just type in Raspberry Pi and it should
be able to find where it's at I know the
IP address of my server though so I'm
gonna be typing that it instead but once
you have that you want to do it
port 22 and you can just press open and
we'll get this window here I am just
going to resize it for you guys so
you're able to see a little bit better
so I'm just gonna make it a little bit
bigger and by default the normal
username it's pi and then the default
password is raspberry I've already
changed mine so I'm gonna be typing that
in instead but you'll just run that now
first what we need to do is we need to
update our server so we're going to run
sudo apt-get update and and sudo apt-get
upgrade and we'll just run that command
real quick
so as you can see mine is up to date so
what we need to do next is set a static
IP address for our Raspberry Pi that way
the Open VPN server can work and it'll
also help with port forwarding which you
will need to do anyway so to access this
file all you need to do is just type in
sudo nano ford slash et Cie ford slash
dhcp CD comm and it'll bring us to this
file so I'm gonna go all the way down to
the bottom and you'll see right here
you'll see your two interfaces wlan0 is
your wireless and then eth0 is our wired
connection now I recommend you use a
wired connection like I said so I'm
going to be setting the IP address of
the wired connection to this IP so when
I do that one six eight dot 0.74 you can
set the wireless one to whatever your
router assigned it by default but I am
specifically gonna stick with this one
for the Ethernet once you've done that
you can just close out of the file with
ctrl X you'll press Y if you've modified
it to just save the changes and you'll
press Enter now that you've done that
you need to restart your server again so
to do that you can just type in sudo
reboot and you'll get a disconnection
and we'll just wait a couple of seconds
and reconnect
so we'll right click up in the corner
and just your restart session and now
it'll say log in as we can type in PI
again and our password and now we're
reconnected I'm just going to clear the
terminal and then now we can install PI
VPN so to do that we're gonna go to the
website which is right here and we'll
just copy the installation right there
and you can just right-click into putty
and it'll paste it in and we'll press
Enter it'll run a quick update check
just to make sure everything is good
and it looks like we're up to date so
it's gonna continue with the install now
I'm just downloading all the
dependencies that PI VPN needs so we're
gonna wait for that to finish and it
looks like it's done so we can just
press Enter it'll say that names a
static IP we've already set that up so
we can just press ENTER and we can
choose an interface so I'm gonna be
using Ethernet it's already selected so
I'm just gonna press tab and do ok and
those current network settings are
correct those are the ones that we just
set up if for any reason they're not the
same as the ones you just edited in that
confiar you can just press no' and it'll
let you type it in so that is good for
me
I'll press ok default gateway this is
the IP address of your router if you
don't know how to find this you can just
go into command prompt and you ipconfig
/all and find your network adapter which
this one's mine and default gateway
right here that is correct too though so
we're just gonna click OK it'll ask once
again if the settings are correct and we
can just click yes we'll click ok that's
fine so it will press ok again and then
it just wants us to install unattended
upgrades since we are going to be port
forwarding this machine is open to the
public Internet so it's good to have
this on for security update so we'll
click OK and then we'll say yes for the
protocol we're gonna use UDP click OK
and then you're gonna choose the port
for your VPN 1194 is the default for
most VPN connections you can use 443 if
you have a reason to believe that
whatever Wi-Fi hotspot your going to be
going to might have this port blocked so
443 is a good alternative I'm gonna
choose a completely different port this
is just for me but I would do 1194 or
443 it's up to you it'll ask if it's
correct so that looks correct to me so
I'm gonna click yes and then it wants to
know if we're gonna do Open VPN 2.4 yes
all of our clients should be using this
so we can press yes it's more secure and
then say certificate that is a good size
we're just going to press
okay again and as you can see this is
very forward in terms of an install and
then now will it use a public IP to
connect or a DNS name so if you have a
static IP address you can use a public
IP if you do not have a static IP
address meaning your IP address changes
from day to day or at once every couple
weeks you want to use the DNS entry I'll
have a video link below showing you how
to set up a dynamic DNS for your router
so that way if for any reason your IP
address changes it'll always stay
up-to-date and you won't have any
connection issues I have a static IP so
I'm just gonna leave the public IP and
press ok now you can choose your DNS
provider Google is fine again I'm just
gonna do CloudFlare it's personal
preference for me and okay custom search
domain no and then the install is
complete it tells us what we need to run
to create our profiles so we can just
press ok and it's gonna ask for a reboot
we'll say yes and ok we'll get the error
again that's normal we'll just press ok
and then we'll wait a couple seconds and
reconnect so I'll right-click and
restart session login again and I'll
just clear the terminal again so now
that the terminal is clear we can create
our profile so to do this we can just
type in pi VPN ad and press enter now to
last for the name of the client I'm just
gonna type in Shane laptop in the last
cut along the certificate should last a
thousand and eighty days is fine I'm
just changing it personal preference
well in our password for the client and
it'll have its verify it again
and it will create the profile so I'm
gonna create one more just for my phone
just to show and I'll do Shane mobile
all day 365 days again and a password
and there we go so both are created and
now we just need to get those files to
use our VPN so I'm just gonna minimize
putty and this is where FileZilla comes
into play so I'm just gonna open up
FileZilla and it will have us connect so
our host is just gonna be the IP address
that we set for our putty which in my
case is the 0.74 username is PI and
password is the password of your user
account which should be rest buried by
default port 22 and click click connect
and then now if we go down here we
should see an OB PN's folder we're just
gonna double click on that and there are
our two configuration files that we
created I'm just going to download both
of them so I'll just highlight them and
drag them over to my desktop now we can
close out of FileZilla and then we just
need to launch the Open VPN GUI once you
launch it the first time you will get
this error message that's okay we can
just press ok and then now if we go down
into the taskbar you can see the Open
VPN icon we're just gonna right click on
it and click import file and we just
want to navigate to where it is saved in
my case my profiles are on my desktop so
I'm gonna go to my desktop and I'm just
gonna click ashame laptop file has been
imported successfully and now we're
gonna press ok before we can connect we
need to port forward to the port that we
assigned in the installation on our
router to the IP address of our PI it's
different for every router I'll have a
link in the description kind of showing
you the general idea for your router
it's a resource that just kind of pushes
it all into one don't click any of the
ads or links or any of that stuff on
that website just follow the steps based
on your router for mine though I'm gonna
go to my router
and now that I'm at my router I just
went and found the port forwarding
section it's probably gonna be an
advanced tab of your router just search
for port forwarding and then once you
get there you'll just create add a
service or create new port forward
whatever it says for your router and
you're just gonna name it whatever you
want I'm gonna name it open VPNs
tutorial just because it's their service
type tcp or UDP in this case we did UDP
for our connection so you'll click UDP
and then the server ipv4 address is
going to be the ipv4 of the server that
you set up your static IP for being the
Raspberry Pi so in my case that one will
so nine two dot one six eight dot zero
dot seven four and then your start port
is going to be the port that you set up
to use for open VPN connections by
default it was eleven ninety four or 443
unless you changed it to something else
you'll just put that pour it in and then
just click Save I've already done that
as you can see I have a connection right
here and it's pointing to my PI and then
port forwarding is enabled now that
you've done that all you have to do is
just go over to your open VPN client
right click and press connect it'll last
for the password that you created when
you were making the profile so I'm gonna
type that in it'll give you some
messages and then in a little bit we're
connected as you can see the icon goes
green and if we hover over it says we
are connected to Shane laptop and when
we were connected sets so that's
basically how to set it up I'm just
gonna show you how to do it on an iPhone
real quick in case you wanted to know
it's super easy to set up and it takes
literally like three minutes or less so
you'll plug your iPhone and your
computer make sure you have the open VPN
app installed on your phone and then
once it's plugged in you can open up
iTunes as you can see it my device shows
up in the top corner well click on it
and then we'll click on file sharing
next you'll click on Open VPN and you'll
scroll down and click Add file now
you'll navigate to where you saved your
own VPN profile in my case that's on my
desktop
shayne mobile will click open and then
will click done and as you can see on
our device it shows the profile
available for import we're just gonna
click Add and you can rename it to
whatever you want I'm just gonna rename
it real quick and you have the option to
save your private key password so you
don't have to enter it every time I'm
not gonna do that this time and we'll
just click Add you'll get a prompt
you'll just click allow and then it'll
ask for your passcode and now it is
available you just tap on the toggle
switch it'll have you enter your
password for the profile and press ok
and as you can see we are now connected
and it proves that this works what I'm
gonna do is I'm going to disconnect from
the VPN and if I go over to my web
browser as you can see I'm able to
access my proxmox server I'm on Wi-Fi so
it's a local IP address and it's pretty
normal as if I was just from home but if
I want to do it on data I go to data and
I refresh the page and it times out
nothing's loading as you can see the bar
I have no connection so I'm going to go
back into the Open VPN enable it and as
you can see I'm connected to the VPN now
if I go back to the web browser it loads
instantly and I'm able to tap on details
and everything loads nice and smooth I
can view my machine and I'm still on
data I am not connected to Wi-Fi alright
guys so that's pretty much it that's how
you can connect to your home network
from anywhere I'll leave some links down
below to the github repository if you
have any questions about the hardware
side or run into any issues and if you
have any issues you want to ask me about
you can leave a comment down below and
I'll make sure to reply to them and see
if I can help you out you know my guys
hope this video helped you I'll catch
you guys in the next one peace
2CUTURL
Created in 2013, 2CUTURL has been on the forefront of entertainment and breaking news. Our editorial staff delivers high quality articles, video, documentary and live along with multi-platform content.
© 2CUTURL. All Rights Reserved.