Access your RaspberryPi from anywhere WITHOUT PORT FORWARDING using Twingate

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right how's it going y'all so today twingate sponsored this video onto how to set up a Raspberry Pi as a twingate server this allows you to connect to the Raspberry Pi any resources behind it and even other things on the network without having to do port forwarding or anything like that twinge is a really cool VPN like app that essentially allows you to have pretty much remote access to any devices you like all without really worrying about all the complex VPN configuration because you have multiple things in multiple sites and routing will be handled automatically it's very similar to a VPN but it is actually different instead of doing the entire networking instead it's almost like there's encrypted port forwarding for every single device and everything specific device that is just handled without you ever doing anything and you don't need port forwarding so today I'm going to be setting up how to connect to a Raspberry Pi and for this we're going to be using a get T server so if you want to manage your git repositories remotely using twingate and we're going to be able to connect to this from wherever in the world as long as we're online without port forwarding all right and so the first thing you need to go ahead and do is just log into twingate and set up an account very straightforward I've also already installed this on my Mac so Twain gate is installed on my Mac it's incredibly easy very easy to go ahead and just you download it from the App Store and sign in and that's where we're at right now and so then I've also got a Raspberry Pi that's on a separate VLAN so right now and after that VLAN with this wire but if I unplug it like I just did I would not be able to access this so we're going to use that to kind of simulate the internet so right now I am plugged in the network well once it comes back up I will be able to connect to my get T server and be able to do everything but as you saw once I unplugged it I was not able to access it because I've disabled inter VLAN routing on this device and so what this is doing is it's just simulating the internet and so if we can connect to it on a separate VLAN we'll be able to connect to it anywhere in the world on the internet all right until now setting this up is going to be very straightforward and we're actually going to be using one of their great guides right here and talking through it so we're going to be using this as a Docker node and so the first thing we need to go ahead and do is just install Docker on our Raspberry Pi this is the only thing you need to install ahead of time and so we're just going to do that here and the way you do that is you just paste in this so this is essentially just saying hey go to get docker.com which makes it really easy to do everything pull that code and run it in Shell only do this for domains you trust we should trust Docker but this is executing code and so now it's just automatically going to install Docker for us it is great so I'm just going to go ahead and let that run and after we're done we will have Docker installed on our Raspberry Pi and we can go ahead and start installing our twin gate Network all right and so now we've got Docker installed just that easy now we need to create a connector a connector is essentially used to allow resources on a remote Network so that means you're able to use this connector to access things if you set it up that are not actually installed twingate on so say I had another Synology on my network I could use the connector on the Raspberry Pi to connect to that if I set that up and wanted to so that's one thing you don't have to have it running on every single device so we're going to go ahead and add a connector and we're just going to do that in the admin portal so we just sign in and for remote networks we just need to go ahead and create a new remote Network we're going to say it's on-prem and we're going to call it pi so this is our PI Network you could also call it your home network that's probably easier but now we just need to go ahead and create a new connector and so the connector is used as that bridge that allows you to connect to various things so we're going to go ahead and deploy the connector and we are going to use docker so now twingate uses access tokens for authentication so what we need to do is we just need to go ahead and generate these tokens and we have to authenticate again and so now we have new access tokens I will be deleting these before posting this video and now we do not need to do anything here now if you do have a custom DNS server you can work with that but we're just going to be using IP address for resolving everything here so now we just need to go ahead and copy this guy right here and run it we do need to add a sudo to the front of it so we're just going to copy it all right and so now we just need to add sudo in front and paste it in there and everything is automatically set up as you can see there's a lot of characters in there and those are our access tokens and so this way we don't have to deal with authentication and everything like that instead it's all done ahead of time which is awesome so now we can go ahead and open it on up and we should be able to see that the connector is automatically added in to twingate so let's go ahead and check that out so we can see the controller right here is connected all right and so now that we've got the connector all we need to do is add a new resource so we'll go into Network and add a resource and for the network we're going to choose that Pi Network that we just set up and now we've got two different options for most home users unless you're running your own DNS server and have your own domain name you're probably going to go for a IP address so I'm using that and I'm just going to copy that IP address right here you will want this to make sure to be a static IP address this does not work with just standard host names well you probably could get it to work with host names with DNS but would not recommend that so now we've got our git server running and we can also just set it to Ports so we can say they only have access to Port 3000 so now this is a resource we will be able to connect to so let's go ahead and just add that resource and we can say who has access to it since I'm just one user everybody but if you have a company you can say exactly what team or what user has access to what resource all right and so now essentially we are online and we should just be able to connect to it so now let's go ahead and refresh the page works but now let's leave our tunnel so now I'm no longer on that VLAN instead now I'm essentially just on the internet because there's no connection I've been doing these two we refresh and just like that it worked it is very easy to go ahead and set this up for every single device and every single resource you like we can also see that if we kill twingate we are no longer gonna be able to connect that's because this IP address does not exist on this network it only exists with the twing gate tunnel just had to go ahead and re-authenticate and just like that it connected this is all we had to do because twingate manages everything behind the scenes all right well that's gonna be it for this tutorial go and leave any of the tutorials like we check out in the comments below and thanks for twingate for sponsoring this tutorial all right have a good one bye [Music] thank you
Info
Channel: SpaceRex
Views: 19,842
Rating: undefined out of 5
Keywords:
Id: VUI0LB5HqH0
Channel Id: undefined
Length: 7min 44sec (464 seconds)
Published: Sat Aug 06 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.