Use Private Internet Access with OpenVPN in a Proxmox Container

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone welcome back today we're going to create a container in proxmox and set it up to run private internet access to encrypt all of your your traffic going in and out of your your system to the internet and if need be make it appear that you're in a different part of the country or even world next on low res diy [Music] so why would you want a vpn like private internet access well one privacy it sets it up to where it's everything is encrypted so your internet service provider uh can't see what you're doing you know they don't need to know that you're on the internet looking up how to build a nerf battle axe for your next larping adventure that's none of their business one of the other things is a lot of people use it for nefarious reasons like downloading pirated music and movies uh which is illegal another reason is to make it appear that you're in a different part of the country or world let's say uh your favorite sports team all of a sudden the channel that carries it is no longer carried by hulu and you can only get it through through uh your local cable system and you don't want to subscribe to it well you can go and maybe subscribe to the mba package or the nhl package or mlb package and uh if you try to watch your local sports team they'll be blacked out but if you use a vpn and set it up to where it appears you're in let's say atlanta where that game is not blocked out you'll be able to watch that game just a few reasons why you might want to have something something like this set up on your computer or in your home lab so with that let's switch over to the computer and we'll show you how to set it up okay i've already created a container in proxmox it's 102 called it pia private internet access and you'll notice it's not running well one of the things you want to do is set up a tunnel that will allow your container to to talk to the um the server that you're wanting to hook up through through pia so you'll want to go to your node in this case it's low res and go into your shell and you want to navigate to this directory you want to do a cd slash etc slash pve slash lxc hit enter and then do an ls and you'll see there's these config files in here you'll notice the numbers correspond with your container so this is container 100 configuration file we'll want to edit the 102 config file so we'll do a nano 102 dot config i obviously typed that wrong so let's try it again once you're in that file you'll want to add this line right here which will create the tunnel that the container will use once it's added and i'll have links to all of this in the description so uh you won't have to pause the video or anything but once it's added hold control hit x yes you want to save the modified file and you want to keep it the name 102.config hit enter now you can go back to your container and let's start it up log on and as always do an apt update and an apt upgrade once it completes all the updates we're going to want to install a few dependencies so apt install we're going to want to get curl net tools open vpn open ssh server and unzip hit enter and let that run once it's complete we'll be able to shift over there'll be well it'll make a couple directories and one of them is the openvpn which we're going to want to go into that directory so a cd four slash etc openvpn and then we're going to want to download the certificate and all the server information for private internet access this is the uh you do a w get and this is the path it'll go through so you hit enter it's a quick download and then we're going to want to unzip that file you notice once it unzips it has this is all your server information these are all the servers that you can log on to if you want to next up we're going to make a connection file so we're going to do a nano four slash etc for slash open vpn and we're going to make a connect sh hit enter and in that we're going to want to copy and paste this string which tells the system how to log on to the server now i've got it set up to where right here when i log on it will log into the server out of atlanta and then we're going to need to create this login text next so once you paste that in control x yes you want to save it enter and then we're going to create the login text file so nano etc hit enter and this is where you're going to copy in your username and password once you sign up for private internet access they're going to send you an email with a a unique username i think they all start with p with a bunch of numbers after it and a unique password first thing i would do is log on and i would change that password to something uh that you're used to but you can't change the username so paste those two in there first line will be your username second line is your password and that's it control x save it yes enter and then we're going to make an ip table now i didn't come up with this ip table i actually saw another video uh by craft computing where he he did pretty much the same thing but in a vm and he used nordvpn for his setup and he created this or he found a website where this ip table was on there so the the the biggest reason i i want to use this table is that let's say your vpn drops out for some reason you become disconnected well normally it will just keep downloading it will act like nothing changed but you won't be routed through that vpn well this ip table will cut off any connection to the internet so if you lose connection with your vpn that stops everything there'll be no more traffic running through the system and you'll have to reboot or restart your vpn and log back in and we're going to go and we're going to put this under the openvpn directory still and just call it iptables.sh oh i'll have a link for that video from craft computing in uh in the description if you want to check that out out also hit enter and there's a whole long string of text here that needs to be copied and pasted in one of the the one thing it took me a while to figure this out but nordvpn uses a port of 1195 i had to change this to 11.98 once you have that in there throw x yes and save it so pretty much everything set up now that if we did want to start up the vpn we would be able to log into the server in atlanta and just this system would be uh encrypted just this container i want to set it up to where every time you boot this container up it will start up and it will run the ip table it will log into the server out of atlanta and it will always be on the vpn so to do that we're going to want to make another file and call it startup and this one we're going to put under the user local s bin and we're just going to call it startup.sh hit enter and what we're going to do is add this script to it and it tells the system that when it boots up run the ip table wait five seconds then you're going to want to enable port forwarding that will allow other systems or other other things on on your uh local internet to access the vpn and then you want to start the vpn so we're going to hit control x and save it yes okay once we get this file created we want to make it an executable file and to do that we use this chrome mod promod plus x the directory and the file name that you want to make executable and you hit enter next up we need to create a system service file this is a it's just another file that's needed to tell the system hey we want you to to start this program at boot it's a real simple script it just says a description at startup is when it's going to start and we want you to run this file and just the default user it doesn't matter same thing control x yes enter and everything set up technically to run but we need to enable that startup service and the way we do that is with this string right here system ctl enable startup.service hit enter it should enable it but let's check to make sure and let's see right there it is now enabled so hopefully we'll go ahead and do a reboot on this and when we reboot it it will have a different ip address but let's do the curl ifconfig dot me and that shows my ip address that the uh my internet service provider is providing me right now it's not encrypted it still knows where i'm at and everything else so let's do a startup or a reboot with the system rebooted let's log back on and let's run that ifconfig script again and now our ip address is completely different one five 154.21.22.152 which is out of atlanta so all right we got it set up everything's running the way we want it if we want here i set up a test container and i set the gateway as the server we just created so if we go into the console and we do an if config on this one same ip address so now that everything's set up and running properly you can either a go to each piece of individual piece of hardware that you want to have encrypted traffic on and set this container up as its its gateway or b go to your router set this up as your first dns server and then all traffic throughout your entire home will be be encrypted um a few things i do want to mention before we end the video let's bring let's bring this back up and let's have a look at that i p table again if you're not using the 192 168 1.0 uh measure ip addresses say you're using a 10.0.1.0 or a 192.168 0.0 you're going to need to change it these four areas right here you're going to need to change it to whatever scheme you're using uh i'm using the 168 1.1 so this works for me also the one other thing let's check out our connection file let's say you don't want to go out of lane out of atlanta you can just scroll over and change this to whatever you want you want to be out of sweden restart your server you're going to get an ip address out of sweden myself i just gonna use atlanta no i do not want to save it if let's see if you want a list of all the servers you can just do a ls command under the openvpn directory and here they all are so if you're just curious that we've got mongolia and whatever it's just servers all over the world change those two things or change that line and that will change things around for you so until next time hit that subscribe button like it if you liked it and thanks for [Music] watching
Info
Channel: LoRes DIY
Views: 11,010
Rating: undefined out of 5
Keywords: private internt access container, private internet access linux terminal killswitch, private internet access killswitch, private internet access openvpn setup, internet privacy, proivacy, block google, hide browser history, pia tutorial, pia vpn, private internet access vpn, private internet access, private internet access tutorial, private internet access install
Id: vBCrWs5bFsA
Channel Id: undefined
Length: 14min 56sec (896 seconds)
Published: Tue Jan 26 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.