So if there’s anything that Iunderstood about my gathering in the past 3 or so years of pas this direct is that you guys certainly seems to have been like my VPN videos the 2 of my videos about VPN seem to get the most attention on my channel with a huge margin and, well, I like attention So here I am back with another banger I suspect So a good deal of you guys asked me inthe comments on those 2 VPN videos: “Wolfgang, seem, I don’t trust thoseVPN companies and VPS corporations. I don’t want to invest my hardearned dollars every month to pay for some kind of a VPS or VPN service. Can’t I just host VPN at home, in the consolation of my own live? ” and the answer to thatquestion is “Well, it depends”. So let’s talk real quick about whypeople use VPNs in the first place.Here are some of the mostcommon use cases for a VPN: Getting access to your residence or corporatenetwork securely while being somewhere else Protecting yourself in a unfriendly or anunsecured network on an airport or caf Wi-Fi Or in some cases avoidingtracking and surveillance by a malicious ISP at academy or at work Tricking websites into thinking that you’rein a different country to get access to some kind of a gear limited content Circumventing censorship andgetting access to stuff that is normally blocked by your ISP or your authority And last-place but not least piracy downloading illegal stuffin countries where doing that on your regular ISP connection would getyou a sizable penalize or a threat. Now certainly, those are not allthings that you can use a VPN for, because if I registered all the usedcases you’d be sitting here all day. But basically one thing that iscommon about all of those cases is that parties generally use a VPNto pretend they’re somewhere else … for many reasons.And if you want to host your VPN at home it will be useful for you only when you need to pretendthat you’re at home … Does that make sense? For example, you is intended to be outand about somewhere in the caf and you want to connect tothe unsecured Wi-Fi hotspot and if you don’t fairly trustthe network you’re connecting to you can just launch a securedencrypted tunnel to your own house to browse the internet safelyas though you were at home. And of course if you havea homelab or a residence server you can get access to all ofyour regional assistances securely without the need of exposing them to the Internet. This setup might also come in handy foryou if you often travel to countries where you can’t torrent or stay particular websites or maybe if you want to watch yourlocal TV establishes while you’re abroad.So all of that prays thequestion: Why not just use a VPN? Well first of all: no monthly costs. The only thing you need to pay isthe upfront expense for the hardware. I’ll be able to use a Raspberry Pi here and itcosts about $60 with all the accessories but we’ll too talk about cheaperalternatives last-minute in the video. The second reason is that youdon’t have to trust any third party if you watched some of myprevious videos about VPNs you know my opinions about VPNproviders, there is an opportunity somewhat skimpy but in this case you areliterally your own VPN provider. As long as you trust your ISP more than youtrust a random unsecured network in a caf, you’re good to go. And then last-place but not least, retrieving your neighbourhood services securely while you’re on the go I already mentioned that one so Iwon’t be going too much in depth here.Now let’s talk about the requirements So, what are you going to need for this project First of all you need basic technical skills We won’t be doing any PHDlevel nuclear discipline here, but you will need some basic knowledgeof, you are familiar with, consuming a computer, some Google-Fu and basic problem solving skills. A pile of people in thecomments have been asking me “Look, Wolfgang, is there like a lane, for likeless technically savvy beings to do all of that? ” and unfortunately that’s just the entryprice you have to pay for that kind of stuff. You can either get yourself a VPNservice subscription and have no insight at what’s going on behind the curtains, or who’s coming your data where it goes to, etc. or you can spend some timeand do everything yourself and yes it might be technically challenging but you do get some kind of a restrain overwhat you do and where your data goes to I’ll deter this tutorial as simple as possibleand the video will be divided into sections and you can use the YouTube speed settingif i’m going a little too fast for you and I will also include a textbook versionof this guide in the video description so make sure you take a look atthat if you like this format better All in all, I think it’s a cool weekend projectand certainly a good learning process So let’s talk about the technological requirements now First thing you’ll need is adedicated Internet connection and be made available to your router’s admin panel if you’re connected to the publicWi-Fi in your student dormitory, unfortunately that’s just not going to work.Then you’ll need an ISP that isokay with you hosting substance at home Here in Germany, where I live, most of theISPs will let you host stuff at home just fine Except for the mail for some reason A lot of ISPs are blocking theport 25 for outgoing forward now But in other countries some ISPs might put yourInternet attachment behind a shared IP address and simply furnish a dedicatedIP address as a business assistance or something they have to pay for added If you miss an easy way to knowwhether your ISP is dedicated or shared you can go to website like whoer.net and seeif it maybe says that you’re behind a agent If it does, that’s a pretty good indicator thatyour PC won’t be accessible from the Internet so that tutorial is not goingto work for you, unfortunately You’ll too need a router that supportsa function called “Port Forwarding” The easiest route to check is open your browserand go to your router’s administration panel( Usually something like 192.168.0.1 or 1.1) and look for a function called “Port Forwarding” I’ve had about 4 routers here in Germany, and they all corroborate that part One more thing that you’ll need is a computerthat will basically live in your house and be on 24/7 It doesn’t have to be super strong or sinewy “if youre having” like an aged laptop or a netbook, laying around, that will do just fine.For this tutorial though, I’ll usea tiny computer announced Raspberry Pi I’m sure that a great deal of you are familiar with it It’s small, relatively cheap, andhas a very low power consumption You can even run it off ofsolar energy if you crave Do keep in imagination that apart from the board itself, you also need a dominance adapterand at least an 8GB microSD card I wouldn’t cheap out on microSDcards because, you know, inexpensive microSD cards from Aliexpresstend to break much faster than, you know, the label ones from Kingston, Transcendand other symbols, so do restrain that in mind.Optionally if you do have a monitor akeyboard and a mouse somewhere in the members of this house I proposed to buying a microHDMI to HDMI adapter That course you can connect your RaspberryPi directly to your observer keyboard and mouse and it’ll be a little bit easier to set up But if you don’t have a monitor or aTV that supports HDMI that’s okay extremely, we’ll go over the whole setupprocess later in the video. You’ll likewise need an Ethernetcable and a microSD card book if your computer doesn’t previously have that one Otherwise if you don’t compensate a great deal forelectricity where you live and you don’t care about the place the computer makes or the noiseyou can take whatever you have laying around, only make sure it has Ethernet port and thatit’s capable of scurry 64 -bit operating systems.That being said, I will only be covering thesetup process for Raspberry Pi in this video. But do let me know in the comments if you’dlike to see a separate video on this topic, on how to set up a VPN on a regularcomputer, such as a laptop or a netbook. Now with all the requirements and disclaimersout of the way, let’s get started! First thing we need to do is downloadthe operating system for our Raspberry Pi Depending on whether you’resetting it up with a observer or without one you can downloadeither Raspberry Pi OS Desktop which was like that or Raspberry PiOS Lite which looks various kinds of like that If you’re doing it with a observer or Tv though the former has a benefit of being ableto open a browser and follow biddings from my handy dandy text guide which I’ll throw in the video description down below Now I must be pointed out that Raspberry PiOS is a bit controversial and got into a bit of fus lately for includingMicrosoft’s repositories in the installation So if you’re a die-hard Linux veteran and youdon’t want to contaminate your residence network with the suffering Microsoft softwarefeel free to choose something else Personally, I can recommend Ubuntu MATE or”Mate” if you prefer as a solid alternative Next thing we need to do is download Etcher Etcher is a tool that will help us write the operating system that we justdownloaded to the micro SD card I chose Etcher because it runson Windows, Linux and macOS but if you have some other tool that you prefer, such as dd or Rufus, you can use that instead When you are both Etcher andRaspberry Pi on your computer you can now insert the microSDcard into your computer Then, open Etcher, choose the RaspberryPi OS image that you just downloaded, adopt your microSD card and click “Flash” This is going to take some time so feel free tograb a beaker of chocolate or tea while you’re waiting After the flashing is done you’ll hear anew magnitude in “This PC” menu announced “boot” Go to that work, create a new text file, and call it “ssh”.Be careful! It’s not “ssh.txt”, it’s”ssh”, without any extension.To time that, you need to have the “Hideextensions for known enter types” option incapacitated in the File Explorer options. With that done, you can now ejectthe microSD card from your computer Now leant the SD poster into the Raspberry Pi, plug your Ethernet cable intothe router, and into the board Then lastly push the USB Type-C cable into it In case you want to set up yourRaspberry Pi with a check, you also need to plug in the monitor, thekeyboard and the mouse into it at this degree So once you’ve booted your Raspberry Pi up, youwill be presented with a very nice setup wizard which will actually let you skipa huge portion of this video Precisely follow the instructions on thescreen and reboot your Pi when asked And now you can skip to thistimecode.See you there! Now you need to wait for about a couple ofminutes while your little computer is booting up and then let’s open the browser again andgo to the router’s administration panel Go to the page that registers all thedevices connected to the network and there it is! Just copy the IPaddress of the Raspberry Pi now Now we need to open the command line interface On Mac and Linux its called Terminal, and onWindows we’re going to be using PowerShell. That’s really the only inconsistency for us, since we’re only going to be usingit to talk to our Raspberry Pi so if you’re in Windows, go to thestart menu and search for PowerShell open it and character this command: “ssh pi@[ and now paste the IP of the Raspberry Pi] ” you can use Cmd+ C as usual on Mac, on Linux youcan use Ctrl+ Shift+ C or sometimes Ctrl+ Alt+ C and on Windows just right click on theterminal and it’s going to glue the text Answer yes to the next question andtype “raspberry” when asked for password The password won’t be shown on the screen not even the asterisks or, like, cliques and that applies to all the password lands in the Linux command lineinterface, so don’t worry about it First thing we need to do, is alter thedefault password to something more secure We won’t be disclosing a RaspberryPi to the internet per se, so you’ll merely be able toaccess it from your mansion because of that I won’t be going in depthabout advanced SSH login security in this video but if you’re interested you cancheck out this tutorial of mine where I discuss differentmethods of securing remote access So in order to change the password, you need to type “passwd”, category your current password( “raspberry”) and then type your brand-new password twice And that’s it! Next thing we’re going to do is update our operating system to all thelatest versions of software For that, category “sudo aptupdate && sudo apt upgrade” this will take a few minutesdepending on your internet rate and meanwhile you can impel yourself another tea, stare at the blinking lights on the Raspberry Pi, or sing some sea shanties After the facility is complete and you meet the light-green command prompt again character “sudo reboot” to reboot the board.Now that we’re done with the initial readyings we need to get ourselves a dynamic DNS hostname. The thing is, unless you’re usinga business broadband contact your external IP address is not static it changes every week or so. IP addresses wield pretty much in thesame route as physical places use so let’s say you have a house in New Yorkand are waiting for an important letter But then next week you have tomove to, let’s say Los Angeles how can you be sure that you get that letter? well you set up a forward forwarding busines, which gets all the words for you and forwards them to your current address. A dynamic DNS service is kind of a mailforwarding work, but for computers. Now there are a lot of DDNS providers out there, some of them free, some ofthem with a subscription scheme. For this tutorial, I’ll be using afree plan from freedns.afraid.org That tell me anything, you can use any service you require I is certainly not endorsing any specific one and the only reason I elected freedns.afraid.org is because that’s the first freedynamic DNS work I’ve found on Google that doesn’t have any weird limiteds After registering in a website andactivating your accounting via email, click on the “add a subdomain” Here the things that we need to change are Subdomain, really employed what it is you wanthere, I’m going to framed “wolfgangsvpn”.Domain, there are a few funny domain names here to choose from and I decidedto go with “crabdance.com” Destination, by default is going tohave your current IP address in there but we need to change it to 0.0.0.0 That direction we’ll be able to test if ourdynamic IP assignment software actually tasks after that, type in theCaptcha, and click on “Save! “. Now we need to log back toour Raspberry Pi by type “ssh pi @[ the ip address] “in PowerShell or terminal You can also simply press the up arrow key and that will give you thelast command you enrolled Next enter the password that we created earlier Now we need to install a pieceof software announced ddclient for that type “sudo apt installddclient” and press Enter it’s going to ask you for a lot of things, exactly suppose you don’t know anythingby tapping recruit until it opens up Now we need to tell ddclientwhich address it needs to update for that type “sudo nano/ etc/ ddclient.conf” let’s just delete all of thoselines and replace them with this convenient template that you canfind in my textbook navigate in the description now we need to replace several things: “login” and “password”, replace themwith your afraid.org credentials and “somedomain.moo.org”, supplant itwith the domain name that you chose After that is done, press Ctrl+ O tosave the file and Ctrl+ X to exit.Another folder that we need toedit is “/ etc/ default/ ddclient” now we need to change everything to “false” except for this option, “run_daemon”, this one we need to change to “true” Once that’s done, Ctrl+ O, Ctrl+ X Now that all the configuration is done let’s restart the ddclient service byusing “sudo systemctl restart ddclient” and understand what it’s been up to by typing”sudo systemctl status ddclient” As you can see it actuallysays “FAILED” in all caps but if you go back to our browser andrefresh the sheet with our subdomain you’ll see that 0.0.0.0 changedto our actual real IP address which necessitates it worked.Finally let’s make sure thatddclient starts automatically each time we power our Raspberry Pi on, by typing “sudo systemctl enable ddclient” Now one last-place thing that we need todo before actually setting up the VPN is made to ensure that our VPN is accessiblefrom the outside of the home network for that going to see your router’s admin page and go to the port forwarding creates on FritzBox routers it’s called”Permit Access” for some reason. What we need to do here isadd another device for sharing Here on most routers you’ll beable to pick a manoeuvre from a schedule so I’m going to collect Raspberry Pi here. Then we need to create a new port forwarding introduction Here in the field “Application” I’mgoing to select “Other application” and for the honour let’s open “WireGuard” For the protocol, make sure to select “UDP” And as for the port we needto forward the port 51820 on a good deal of routers you’ll need to select2 ports, so “from” port and “to” port only select 51820 in both, and then make surethat Internet access is allowed via IPv4 and IPv6 Then apply the locateds and that’s it! As usual with computers the hardest partof a project is often preparing for it Now we’re lastly ready toactually install and set up our VPN and this is really the easiest part of the video to set it up we’re going to beusing a WireGuard install write from the Github user Nyr I’ve been using this write in mypersonal machines for a few months and it’s really solid andreliable like a clockwork Let’s fake this command from the Github page Go back to our terminal and paste it.As you can see, this commandactually needs beginning liberties to run so we need to type “sudobash wireguard-install.sh” The script is going to ask us for thehostname that we want to use for the VPN: type your dynamic DNS domainthat “weve created” earlier For client name merely placed any list you crave and for “DNS” this is kind of personal advantage I like to use the third option, 126.96.36.199 so if you’re unsure exactly use that, and that’s it! Let’s just press F now and theinstallation is going to begin So as “youre seeing”, theWireguard VPN is now installed and we have a big beautiful QRcode right here on the screen which we’re going to use toconnect to our VPN from the phone Now you can simply download the WireGuardapplication from App Store or Google Play launch the app and click on the “+ ” button Now elect “From a QR code”and scan the code on the screen And that’s it! Now you might want to ask”why test it on a phone? ” “Why not just use the same computerthat we’re use to set everything up? ” Well, the catch 22 here is that we can’ttest our VPN on the home network because … we’re already on the residence network So what I’m going to do now is I’mgoing to turn off the Wi-Fi on my phone and then try to connect to ourVPN on the cellular network to see if my IP changes.As you can see afterconnecting to the WireGuard VPN I been in a position to receive the IP of myhome internet connection and since I’m technically browsingthe Internet from my home I been in a position to access all of my selfhostednetwork works as though I was right there And that’s it! Now connecting to our dwelling cooked VPN froma computer requires a few added paces First we need to move the configurationfiles to our home index For that, log in to the Raspberry Pifrom the terminal, and type “sudo su”, Enter and then “cp/ root /*. conf/ home/ pi” Next we need to create a folder for allof our WireGuard configuration files Now let’s go to that folder, hold”Shift”, right click on the empty space and sounds “Open PowerShell window here” Here you can press the Up arrow key, supersede “ssh” with “sftp”, and press Enter After you’ve entered the password, you can nowcopy all the configuration files to your machine for that type “get *. conf” and press Enter. Now that we’re done here, let’s typeexit and close the PowerShell windows.WireGuard VPN is cross-platform, meaningyou can use it on Windows, Linux and macOS For Windows, we need to download this record, click on the executable, and now we’reready to install our configuration file Launch WireGuard from the Start menu, andpress “Add tunnel configuration from a file” Now, I’m going to create a Wi-Fi hotspot onmy phone and connect to it on my computer and try to connect to the VPN And as you can see, after freshening the sheet, my IP changes to the IP of my home network And there you go, that’s howyou set up a VPN at home! Thank you for watching thisvideo, I hope it was helpful If you have any questions, do not hesitateto leave them down below in the comments And as usual, I want to thank my Patreons, the people who support this channel.People such as Tim, Mitchell Valentino, Ray Perea, and numerous many others. Thank you guys for watching, onceagain, and I’ll see you in the next one! Goodbye !.