Pi Alert - Open Source, Self Hosted, Network Device Change Notification and Intrusion Detection

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] it's your open source advocate and i'm back with another video and today i wanted to talk about a really cool application called pi alert now if you follow my channel if you've been watching any of my previous videos you'll know that i recently switched away from ero i had ero mesh wi-fi set up around my house because i have an office outside of my house about 40 feet from my house where i didn't want to initially run cable when i first moved in so so ero had kind of served the purpose that i needed which was to reach my my outdoor area here but over time i did need better bandwidth and i'm just you know especially when everything went remote i was already working remote but then everybody went remote so having better bandwidth just made it better for the meetings and things so i ran cable and just little by little i wanted to get away from ero especially after amazon bought them they had some issues so i thought you know what i'm gonna go open source because that's what i do and uh so i've set up open sense and i've got some ddwrt routers that are my access points and it's working really well but one of the features that i really liked about euro is that you could set it up to give you a little push notification whenever a new device joined your network now how it identified that a device was new or not new was always a little bit strange to me i'm not really sure what it was looking at but occasionally you know i'd see devices that was like i mean that device has been connected all day i'm not sure why it's suddenly a new device but it just may be a you know a symptom of whatever is trying to scan the system to to figure out what that is but in trying to find a solution for that i came across pi alert so today i want to talk about pi alert because this is really a cool application and as it as the name suggests you can run it on a raspberry pi now if you've ever checked out my videos on pi hole you'll know that this interface here looks very similar to the pi hole interface and i think there's a good reason for that i don't know that these are by the same people but pi alert actually can integrate pi hole if you wanted to you don't have to into it which is pretty awesome and while it says that it's pi and it runs on a raspberry pi for sure i'm actually running it on a lxc alexi container vm in one of my servers so that's pretty awesome and i wanted to go through how to set this up it's a very straightforward install the setup is very straightforward as well and i'll go through a few of the things that you're going to need in order to get this running so that you can go ahead and do it as well if you want to and then you can get alerts about new devices that are joining your network or devices that have disconnected from your network or devices that are suddenly just missing all the time from your network and i think that could be really helpful for most of you now you can adjust those settings so that you don't get too many notifications or emails you'll see at the top of my screen where email pops up occasionally that's probably the pilot system sending me something about my network because i do have a lot of devices and i have a lot of smart devices that whenever you turn the power on or off they lose their connection of course temporarily so it's it's interesting to see how much i get through that system right now and i'll have to go and make adjustments eventually but i wanted to show you how that functions and how that works so we'll get into it right after this i just want to say thank you so much to all my patrons over at patreon it means so much to me that you want to support me and the content that i create and that you're getting something out of it i truly appreciate your support i cannot tell you how much i thank you but i do truly thank you from the bottom of my heart for your support if you'd like to join and start supporting me on patreon jump over to patreon.com i'll have a link in the description and the show notes again thank you so much now let's get started so we talk about piler like i said you can run pi alert in several different ways now there is a docker out here so i want to mention this the reason i didn't do the docker right now is that it's got some configuration options that i'm just not really you know sure about so i think if you feel like going through this process and kind of checking out what they have here pay no attention to this this is meant to be an icon i believe so floppy disk that's funny but when you say set up some backups what it's going to do all that kind of stuff they really walk you through it they've got some pretty good documentation it was just more work than i really wanted to put in right now to run it in a docker container but it is totally possible they do have stuff here where you can kind of go get this and check it out in docker as well but i kind of went with their instructions here on github and really it's it's a very straightforward setup there's a few things you'll want to have before you do that so if you want to get the emails you need to have your smtp server information and that means your server address the port that the email is sent off of a user and a password for that email server as well so you need to have those things ready because during the installation it does ask you for those things and it's pretty important that you have that really all you need is this command right here which is this curl command and then you can run this so you need to set up your raspberry pi first so it's really important if you're going to run this on a raspberry pi you want to go get raspberry pi os and you can get that from raspberrypi.org download the raspberry pi os image and then use something like etcher or i think they have a raspberry pi image burner software you can get that's free but you need to burn that to an sd card plug in the sd card start the pie you want to make sure you give yourself ssh access a few of those things that you're going to need in order to do this i have videos out there that show you how to do this there are tons of videos out there on youtube that show you how to do this already there's tons and tons and tons and tons i mean literally thousands of tutorials out there on how to do that i'm going to leave that to you to go find those things because it's already documented it's it seems wasteful for me to do it yet again but you do want to make sure you have ssh access you want to make sure that you get raspberry pi os installed i suggest raspberry pi os lite it's the headless version it doesn't have a user interface it's just a terminal and that's really all you need because these things run in a web browser so i'll kind of show you what i've got going i've got pi hole over here now i don't have any of my stuff running through it yet so you don't see any statistics you know running up here yet but i do have it over here running and i did use it i did get it installed with this and then i've got pi alert running right here and you can see that it's found 83 devices and 78 of them are connected and then we've got six events that have happened and basically you get this long list now you'll notice none of these things are getting names i'm not sure why that's happening or not happening in this case but you know it's okay i can go identify them and then get them to get names now depending on how you run your dhcp server and what kind of information is available that could have an effect on whether or not those names and device names show up here if i click on the connected devices it just filters this list down to those devices and if you click on the different events you can see what what those ips were and what events are happening and things like that or new devices i guess is the best way to say that and then over here on the left you've got event information so you can kind of see like how long have things been online or offline and you can check out uh again more event information so presence information devices and then event information for those devices and you can kind of see what events are happening and you can click this little drop down to give you more more things on a page so you can see more information about it so lots of information that comes in here and i am getting the emails so i'll just kind of show you briefly so when you get an email this is what it looks like you get a pi alert report email basically and you get information about what has happened is something join the network disconnected from the network anything like that and you get the ip address and a little bit more information now if there's a name for the device you'll get that otherwise it's going to say unknown and any other information out here but again as you start to refine the system i think you can get more information out of it and again it may depend on how you're running your dhcp and what information is available from your dhcp server as to whether or not you'll get this stuff as well but pretty great to have this information so i like that you can get that email you can set that up i wish there was a way to do like a push notification to an app or use something you know with web hooks like i use with rocket chat or maybe even like a telegram bot but for now email's fine which i think it it's a good start and maybe they can add some other alert options in the future so now i know the important thing you want to know is okay how do i set this thing up so we're going to go over here and i've got my server right here so i've already installed debian and i called this pi alert aria because that's the server that i'm running on i have two servers here so this is the one that you just saw running and then i've got this one over here so we're gonna we're gonna jump over the console and i'm gonna log in now this is gonna be a little bit small and i do apologize about that but i'm gonna log in as root here uh and i do run this as rude it's bad don't do this but this is just to save time for you guys so first thing i need i know i need curl because if i run the curl command it's going to tell me that command is not found so if you see this message that says command not found with debian which i'm running debian buster here because that's kind of the same as what raspberry pi os is based on it's based on a debian version so i figured this would be the best way to go so i'm gonna do apt update uh and then ampersand ampersand apt upgrade and then hyphen y and that's just going to tell the system to go ahead and pull down all of the the repository updates that are available and then go ahead and install them so we're going to let that run it's going to take just a minute and then we'll come back and do the next piece all right that completed so i'm just going to do a reboot real quick now this is not probably necessary but i just like to do a reboot after i install a bunch of updates on a clean system once it reboots which is really fast on lxc containers there it is we'll log back in and we want to make sure that we've got curl so i was talking about curl while ago it still doesn't have that so we're just going to do uh apt and you may have to do sudo if you're not logged in as root which you shouldn't be you may have to do sudo apps just understand that i'm going to do app to install curl w get uh get dash y and it's gonna install those things real quick so that i've got all the stuff that it may need in the script and now we're just gonna grab the installation script right here so we're just gonna grab this and we're going to copy it and we'll go back and we're going to paste that in and we're going to hit enter so it's going to pop up right away with this little kind of startup wizard and it says here's what's going to happen do you want to do this and yes we want to do this so we're going to move left with the arrow key make sure yes is highlighted hit enter it says do you want to install pi hole so you don't have to do this but you can so in my case we'll say sure why not so wants to know also do you want to install the web interface for the admin interface for pi hole and yeah i mean you may as well just say okay it's going to do that it says do you want pi hold to be your dhcp server so in my case i don't i want my open sense box to be my dhcp server in your case you might want to change that and let your pi hole be your dhcp server it's completely up to you if you want to do that you know letting it do that may give you better output into the pi alert system but in my case i'm gonna i'm gonna leave it on no but if you want yes just use the arrow key jump over to yes hit enter so i'm gonna leave it as no uh on this one it says what version of python do you wanna use do you wanna use the ones already installed so if you have python installed already on your system you can select this one here if you don't which i don't then i would say let's just use python 3 and then hit tab to get to ok and we're going to press enter and so the first time pi alert runs it's going to scan your network and it's going to bring in all of your devices and this is asking so the first time it runs do you want me to like do you want me to notice that those are all new devices or just wanted to mark them as as already known basically and so we're just going to say yes go ahead and mark them as already known and then after that when you do subsequent scans let me know about any new devices you find and it says pi alert can notify you by email if you want to activate this then we need to hit yes so we're going to activate it and we're going to put in our email information because i want you to see what that looks like so let you know like email notification needs an smtp server so do you want to go ahead and do that and if if you say yes then it's going to ask you about your smtp stuff if you say no then it's going to skip over the email notification system so here if you had gmail you would use whatever your username is at gmail.com so i'm just gonna say brian at fix it delrio.com make sure i spelled that correctly and this is who it's going to notify we're going to tab to ok now wants to know about our server so my server is box dot fix it and make sure i spell it right so you'd want to type in the smtp server for whatever you're using for email and then hit ok now wants to know the user and in my case it's the same user in your case you may have a different user where you want to put like alert at whatever you need to make sure that's an actual user on your system though if you're going to do that so just be aware of that we're going to tab and hit ok and finally it wants our password for our email so if you don't know your password for your email that's bad if you do know your password for your email you're going to paste it in right here and then tab and hit ok so i'm going to do that and then i'll be right back all right once you put in your password and hit ok it jumps to this next question which says pi alert can basically set up your dynamic dns and update your dynamic dns ip address do you want to set this up in my case i don't i have something else that handles that for me but if you're wanting to use dynamic dns then you could go ahead and try to set that up i haven't done it so i couldn't walk you through it but just be aware that it does ask that finally it says configuration is finished and basically to update the configuration you can edit the file right here at this path so if you need to need to you can log in and just go to this file and update your configuration inside the pi alert.conf and it tells you the installation will start now so it's going to be pi hole um so you see pi hole comes up it kind of does its thing and now it's going to run you through this as well so it says this installer will turn your system into an ad blocking device great and then what do you want to do we're just going to say okay and so it's this is letting you know that pi hole is going to have to have a static ip address or you need to do a dhcp reservation so if you don't know how to do that on your router you need to find out either you need to set a static address for the device or you need to do a dhcp reservation which means basically let it get a dhcp address and then reserve that address i'm just going to go with yes i've done this and we'll see kind of how it goes finally i'd ask what do you want to use for your pie hole dns stuff now you can use custom stuff you can use unbound things like that i'm just gonna go with opendns for simplicity right now so move down to the one you want hit tab to get to okay and then press enter and then you probably do want to have like this initial starting list of of ad blockers so just press tab to get to okay and make sure that little asterisk is there in the box and then i do want this on so again you probably want to do the same thing for the web interface so we're just going to hit tab and hit ok and again on tab and okay and one more time on and tab and okay and then it wants to show everything that's up to you how what how much of this stuff you want to actually log if you want to be anonymous move down here and hit the space bar and that'll move the asterisk to here if you're happy with this situation just hit tab and hit ok and then it's going to go through the rest of the install for pi hole and it usually just runs a little bit of text up the screen it does some installation of a few packages it creates your configuration files that it needs it does some php installation stuff i mean really not too much for you to do other than sit back and let it run and kind of watch to see if you see any errors that come through but generally it runs pretty smooth so at the end you're gonna get this screen that tells you okay here's where you need to go in order to reach this server and then you need to have this password because this is your pi hole password so at least initially you need to have that password set up so we're gonna just copy that thing just to make sure we've got it and then we'll change it here in just a minute through the the web interface or through the actual terminal so we're gonna hit okay it's gonna continue with the installation for pi alert so now it's gonna run up the screen here again just does what it does it doesn't take very long just sit back and be patient and kind of let it run and then watch for any errors that it might throw but for the most part it just kind of does its thing so once you get here it starts i think it starts running at scan and starts looking for any devices and the first time it kind of says okay i didn't find anything because it's like so fast that it didn't have a chance to do the scan so you kind of get a couple of these and then it starts kind of looking like okay now i'm going to give it a minute and then i'll run the scan one more time to kind of see if i can figure out what's happening but it tells you you know here's your internet ip here's just a few different things on the screen that there are information that it's gathering as it starts this process but really just let it run and it's done so i mean that really only took you know other than filling out the form me talking you through it if i had just been going through it on my own it would have taken me less than about three minutes to get everything filled out and done and let this thing run probably less than five minutes so you're going to have this set up and running really quickly if you go through this the way that we just did so it tells you also that you can access this at pi dot alert on your network if it can find it or you can use the ip address slash pi alert with an n slash there so we'll kind of check both of those out so this is kind of set but we do want to change that pi hole password so for your web admin interface is what you're doing so i'm going to do pi hole dash a dash p it's going to say okay what do you want your new password to be so i'm going to type in a strong password and you can't see it when you type it in but then you have to confirm it and that's it my password has been reset which is great so now we can jump over here to the browser and we're going to go check out these websites so i'm going to put in the address that it gave me and then i'm gonna do slash admin if you don't do this if you if you ever get to this point it's gonna show you the little raspberry pi thing that's like hey maybe you meant to go to the admin site and you probably did uh but just do slash admin and you'll be taken to your raspberry pi pi hole here and then you can do log in and then you want to type in that that password you just created and if you didn't do that step then use the password that they gave you and then you'll get more details and you get a lot more control and features and things like that now i don't have this set up yet on my on my open sense router but you can see here kind of that it looks the same as this one over here i'm really no no big difference there so i'm going to go also and we're going to open up the pi alert and we're going to do control we're going to do slash pi alert slash and here's pi alert and it is scanning my network again now i'm going to get a lot of emails because this thing's going to start emailing me my my other one already emails me so i don't really want to run this twice or it's going to email me twice every time it scans and finds something so i really don't want to get that but i wanted to show you guys how to set this up and how to get it going and as it finds devices if you're like oh hey i know what that is you can go in and just click on the device so let's see i've got 10.1 this is my open sense router so if you click on this right here it'll bring you into the device settings and you can go in here and actually make some changes and notice there's a few tabs here that you can see information about and and make changes to um through there so you can jump in here and i'm gonna enlarge this for you guys a little bit on the on the mobile devices there um so yeah it says name unknown so this is open sense firewall owner and again i'm not sure like house yeah okay um type is firewall i don't know is that an option let's see i guess we could put it as a router it's not technically a router it's a firewall but it does routing so we can set it as a router vendor is open sense then you can set a location now whether you can change these lists i don't know i haven't looked into that very much but he's got quite a few options there you can add comments if you want to you can put a little bit of information here so you can say alert all events or alert if down if it's down it's probably going to alert me because it can't get to the internet because my firewall and router are down but you can check the box if you want to so here you can skip repeated events so if it sees another the same event in an hour eight hours whatever you can skip those so that could be useful for some devices that kind of go offline and stay offline for a while um but yeah i mean this this i would want to see all events is it a new device is it archived i mean all these things so you can set up all these settings and once you're done just go down here and click on save and it'll let you know that it updated and it's saved successfully so now if we go back over here when we find it you can see now that it's got some actual information for us to look at inside of this thing so really pretty simple to set up really easy to use really easy to navigate there's really just not a lot to do the events section still you just when you click you get to the same thing you were just in and then you can kind of see what sessions there are any kind of presence detections and then any kind of events that have happened on that device and that's it other than that there's really not much to do on these things you can just check it out but it monitors your network and now i'll get emails whenever new devices are joining my network which is pretty great again once i go through and kind of clean this up and tell it hey don't notify me about every single thing that happens on this device and clean it up and give it some device names is going to be even better but that's pi alert with pie hole i hope you enjoyed this if you did like subscribe tell your friends about it so they can come along the journey with us and i'll talk to you next time [Music]
Info
Channel: Awesome Open Source
Views: 72,637
Rating: undefined out of 5
Keywords: open, source, opensource, open-source, self, hosted, selfhosted, self-hosted, free, software, server, web, internet, browser, linux, mac, macos, pi, raspberry, desktop, digital, ocean, digitalocean, vps, tutorial, how to, setup, installation, instructions, cli, command line, terminal, interface, open source software, open source news, open source projects, pi-alert, pi-hole, pihole, pialert, alert, notification, detection, intrusion, network, device, new, disconnect, connect, connected, pi alert, pi hole, emal
Id: oKl3WFQloE4
Channel Id: undefined
Length: 22min 25sec (1345 seconds)
Published: Tue May 10 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.