Networking with ZeroTier: Creating software-defined networks with Ease

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Music] hello and welcome back to learn linux tv in today's video we are going to check out xero tier xero tier is a piece of software that you can install that allows you to network two computers two servers a computer and a server or some sort of combination of network control devices together regardless of their physical location or the network they reside on it's an awesome piece of software and i can't wait to check it out and i've been wanting to check out zero tier for a while now and it was actually my friend tom lawrence who originally recommended that i check it out but i was way too busy to actually give it a shot you know writing books and things like that but now that the book is done mastering ubuntu server third edition it's out right now i finally had a chance to sit down and check out zero tier and i've decided to make a video about it and well here it is so what exactly is zero tier well i just mentioned that it allows you to network devices together as if they were on the same network even though they may not be on the same network or even in the same geographic area but how exactly does zero tier work well that's exactly what we're going to be exploring in this video but essentially zero tier is a very easy and effective method of networking computers together and it's able to abstract the physical location of those computers or devices because it creates its own encrypted peer-to-peer network and it essentially creates virtual network interfaces on each node that allows them to communicate with each other now each node will need the zero tier client installed and they have to be added to the same zero tier account once they're set up the nodes will have virtual interfaces that they can use in order to communicate with each other directly essentially zero tier is how i pictured in my head that networking functioned like when i was thinking about the networking industry when i was first starting out when i was a complete noob i just assumed that each computer would have a client and then they would connect to each other but then when i started actually studying networking quite a while back i realized well that's not really how networking works now this isn't going to be a deep detailed dive into zero tier or even tcpip networking but zero tier actually does seem to give us that layer of networking simplicity that i feel like we've been missing the entire time that i've been studying the it industry xero tier's web interface allows you to create networks right in your browser and then you can subscribe your nodes to that network and create your own software defined network and going into this i felt like this could have some awesome real potential i mean just think about it you can use it for your organization to network servers together that are split between different geographic areas or you can even use it to share your minecraft server with a friend for some socially distant gaming fun now to be clear i want to mention that this is not a sponsored video well actually it is but xero tier is not the sponsor of today's video in fact they don't even know that i'm doing this video and i'm not even sure that they even know that my youtube channel exists in the first place but i guess as soon as i put this video out well they'll find out then but actually i decided to check out xero tier simply because i wanted to check it out it seems like a very interesting concept and as always when i check out something new i like to create a video about it so i can show you guys but i do want to mention the actual sponsor for today's video lenode lynode has been doing cloud computing since 2003 which is actually before amazon web services was even a thing on the node's platform you can get your server up and running in minutes and they include all of the popular distributions such as centos debian ubuntu fedora and get this also arch linux and let's be honest what could be better than a linux cloud server provider that allows you to tell all of your friends i run arch lenod has multiple server plans available to make any app scalable and flexible you can use it to host a blog set up a vpn server a minecraft server or you could do what i did and set up a website for your youtube channel because the official website for learn linux tv runs on lenode and lenode offers 24x7 365 support regardless of plan size so you can get live help from a real person when you need it new users can get started right now with 100 in credit towards a new account and i highly recommend you check them out because lenode is awesome so thank you so much to lenode for being a continued sponsor and supporter of learn linux tv i really appreciate it and now let's go ahead and dive into the topic and check out zero tier so here i am on the zero tier website and full disclosure you will need to create an account in order to use this service so if you don't already have an account you'll need to set one up and thankfully that process is fairly straightforward so i'm going to go ahead and set up a new account right now so i'm just going to go ahead and fill out the information here and i'll type in my email address password and again and i'll register and like you'd suspect we will need to verify our email in order to use our service so i'll go ahead and do that real quick and that is done so i will go back to the zero tier website i confirm that on a different computer and i'll go ahead and log in so now that i'm logged into the zero tier dashboard i can go ahead and create my new awesome network and this create a network button here is animated it's wobbling it really wants me to click on it so i guess i may as well and actually that was it i just created a network seriously i have a network id right here and then i also have a network name that was randomly generated so what i could do is click on the network id to configure this network and let's go ahead and scroll through and see what we need to do here so what i'm going to do is just change the name i'll change it to lltv underscore net and for the description i'll just put something simple in there and i'll scroll down here increase the font size just a touch i think that should be good enough now i'm going to leave this as a private network i don't want any node to be able to join my network unless i authorize it to be able to do so and this is really important it's the default but i recommend that you leave it on private unless you have a very specific reason to make it publicly available so next we can go ahead and choose an ip range for a network and we have a bunch of choices right here that we could choose from now it really doesn't matter which one you choose but you'll notice that each range has one or two asterisks that'll basically determine how many hosts you can have on that network if you are only connecting a handful of devices or any number fewer than 254 or so then you can go with a network with a single asterisk it really doesn't matter though so i'll choose this one right here so i chose that one and you also want to leave this box checked right here to auto assign an ip from the range that's important we're going to leave that checked so i'm going to go ahead and scroll down and leave all the options at their default and here we can see that we have no devices on our network at this time and that makes sense because well i haven't added any so what i'm going to do is take care of that right now so here on my lenote dashboard i've set up this debian 10 instance right here and this is going to be one of the instances that i'm going to use for the purposes of this walkthrough now you don't actually need to be running on lenode for this to work it doesn't actually matter but since i have the account and i was already logged in i figured why not create a quick instance and use that for the example so up here on my terminal let's go ahead and get connected so i'll ssh into that server and there i go i am logged in and for those of you that are curious here's the distribution release information as i mentioned this is a lenode that is running debian 10. and let's also take a look at the network interfaces as well to see which interfaces we have on this particular server and as you can see here other than the loopback adapter which i'm not going to count we only have one network interface which is eth0 just keep that in mind so let's go ahead and get zero tier installed so i'm going to run curl dash s and then install.0tier.com and i'm going to pipe that into sudo bash now it probably goes without saying or at least i hope it goes without saying but anytime you plan to run a script that you've downloaded from the internet it's very important that you check it first now i have run through the installation process several times for the creation of this content and i have no reason to assume that there's any problems with this script in the first place but checking scripts before you run them on your servers is a very good practice to get into but anyway i'll go ahead and press enter let's get this installed and we have a bit of an error here don't we it's telling us that the public key is not able to be verified thankfully i already know how to solve this particular issue to be fair though i don't really think that i should be in a position to fix anything because i thought that was the whole purpose of a script to basically take care of everything for me but anyway what i'm going to do is run apt install gnu pg as well as apt transport https and that's going to require a few dependencies here no problem let's go ahead and get those installed so let's go ahead and give this script another spin and see if we get further and that certainly looks a lot better to me and now that that's installed we can go ahead and get it registered and connected to our network so what i'll do is run zero tier cli with the option to join and then i need to give it the id of the network that i want to join and what is that id well let's go ahead and fetch it from the dashboard and here it is right here so i'm going to copy this id then back of the terminal i'll paste that in just like that and it tells me 200 join ok so let's take a look at the network interfaces again and we now see this new network interface right here interface number three which was not present when we checked originally but it doesn't actually have an ip address so even though we have this new interface on our server it's completely useless and why don't we have an ip address well the reason is because this is a private network we don't want just any node to be able to join our network we want to make sure that every node that's joining this network is authorized to do so so if i scroll down we can see that we do actually have this node right here checking in it's online so let's go ahead and get this particular note authorized and all i should need to do is simply check this box and back of the terminal let's check the interfaces one more time and would you look at that we now have an ip address on this interface right here and that's awesome so that means that this server is now a part of our network but it's kind of hard to call it a network right now because we only have one node we should add at least one more so we actually have something to send traffic to so what i'm going to do is open a new tab here so here on my laptop i'll do the same thing i'm going to run that same command to install the agent and i will pipe that to sudo bash just like before and i'll let it run and there we go the zero tier software is now installed on my local laptop and because i'm lazy i'm just going to go over here i'm going to copy the join command and i'm going to paste that into this tab right here i'll use sudo because i will need root privileges on my lenode server i'm already logged in as root so i could do whatever the heck i want but here on my laptop i'm not running his route so i'll need to use sudo but it should be pretty straightforward let's see if it works it tells me 200 join okay and as you can see here we have a new network interface and then we already have the node listed right here so i'm going to check the box and now that should get it connected let's see and there you go we have an ip address now what i'm going to do is open yet another tab because this is going to be a very fun experiment to see how zero tier contends with this and what i'm going to do right here is connect to yet another server i'll paste in the ip address this is going to be fun and what's so special about this server you might ask well it is running alma linux which is a brand new distribution and all my linux is a community respin of red hat enterprise linux much in the same way that centos is also a respin of red hat enterprise linux now i've already gone ahead and installed the zero tier software on this server already i just wanted to make sure that it was even going to install in the first place and surprisingly it did i was actually expecting it to complain that it's running all my linux and a lot of these multi-distribution solutions will often throw up their hands if they encounter a distribution that isn't on some arbitrary list but actually the installation of the software worked just fine so i'm going to go ahead and copy the join command just like before i'll paste it in here and again i get 200 join okay and it doesn't show up yet so i will refresh this page let's see what happens and there it is i'm not really sure why i had to refresh the page manually maybe it checks every certain number of seconds or something like that i don't really know but i'm going to check the box and there we go let's see if it's connected [Music] and there you go now all three of these instances my local laptop my debian server and my alma linux server they all have an ip address that's on the zero tier network that i've created so what that means is that they should be able to talk to each other so to prove that i'll create a test file so i'm just creating this test file right here so as you can see i put some words in there and we have that test file so what i should be able to do is grab an ip address from another node in the network so i will grab this one and as you can see here we don't have any files there so i'm going to go here and we will scp that file right over to that server simple enough let's see what happens and it claims that it copied the file let's go ahead and check and there it is we can see that it is in fact the same file so i was able to transfer a file from one server to another via that dedicated network now to be fair the alma linux server is publicly available it's on lenode and the same is true here for this debian server that's on the screen right now and since both servers are publicly available well to be honest i could have transferred that file directly to the server with or without zero tier but it did prove that it works however my laptop is not publicly available so i'll click on this tab here in the middle and that is for my local laptop and i'm going to do the same thing so i'm creating yet another test file and there it is i'll grab the ip address and my local laptop is actually behind a firewall so if it wasn't for zero tier this should actually be kind of impossible let's see what happens i'll go back over here to my debian server i'll go ahead and use sap to see if i can grab that file from my laptop the username on my laptop is mine i'll paste in the ip address and the file name was test2.txt i'll store that locally here let's see what happens and would you look at that i was able to grab that file directly from my laptop even though my laptop is behind a firewall and connect to it just as if it was on the same local area network and there's the same verbiage that i entered into that file on the laptop so i know that it is in fact the same computer and i'll even do one better so i'll ssh into that computer again and i'll cut out the distribution release info to show you that it is in fact that computer and as you can see it's running pop os that is my laptop the very same laptop that i'm recording this footage on and i was able to grab a file from that computer through the internet and store it locally on this server again as if it was on the same local network and that's the main benefit of zero tier because with zero tier you can have multiple computers connected even though they may or may not be in the same geographic area and another thing that i also like about zero tier is right here we have the ability to actually email join instructions to another individual which is going to allow that person to join our network we can authorize their computer and then they'll be connected so as you can see zero tier is awesome and it's easy to set up one of the things that i love most about it is the fact that networking computers together when they are not in the same geographic area seemed like a very hard thing to do when i first started in it and that's probably because it was a hard thing to do when i first started the company that i worked for had a t1 line and they actually had a t1 line connected to i think 12 different locations in the united states it was very expensive to set up but here we have zero tier and i was effectively able to do that same kind of thing for free and just think about all the possibilities for a moment that zero tier can unlock and that's especially true now because we're currently in a pandemic and more people are working from home now than ever before so having something like zero tier is especially valuable because you can actually network your computers with your company servers or your co-workers and the process is very easy and it allows you to abstract the setup of a wide area network down to installing just a client on every node so i think that zero tier is a win so far now the elephant in the room though is the fact that you need to create a central account in order to use zero tier and the argument could be made that would be a lot better if you could download some sort of software and run that centrally and effectively set up your very own zero tier service but you have to trust zero tier in order to trust the service in general because you do need to have that central account now xero tier has information on their website about security they claim to take security very seriously but then again i bet all the companies out there that have ever been hacked have all made the claim that they take security very seriously so do they and is their security solid and sound well to be honest i don't know because only time will tell and i'm not actually working closely with the engineers to know exactly how it's designed but you can actually go to their website check out their information and make the decision yourself as far as whether or not you should trust zero tier for your private data so far though i think it's a very awesome idea the ability to network computers together regardless of their geographic location feels like a superpower and i'm excited to check out zero tier in more detail as time goes on and i'm curious to see how it's going to fit in my network and i think it's going to be a great fit so far but again only time will tell so what is your opinion about zero tier let me know in the comments down below and i'll see you in the next video thanks for watching [Music] you
Info
Channel: LearnLinuxTV
Views: 12,592
Rating: undefined out of 5
Keywords: Linux, Tutorial, Review, Howto, Guide, Distribution, Distro, Learn Linux, operating system, os, open-source, open source, gnu/linux, LearnLinuxTV, LearnLinux.tv, zerotier, software-defined networks, software-defined, cloud networks, network, networking, global, long-distance networks, zerotier one tutorial, zero tier, zerotier one, zerotier one setup, zerotier setup, how to, remote access, remote access computer from anywhere, external access
Id: 9GTXN0opsdw
Channel Id: undefined
Length: 26min 28sec (1588 seconds)
Published: Thu Mar 11 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.