Mastodon

Network Device Discovery

NetDiscover

NetDiscover

Using NetDiscover to find Network Devices

As I've been re-working my home network, moving from an Eero Mesh install to an open source setup using OPNSense as my firewall and router, and DD-WRT for my Wired / Wireless Access Points, one thing I didn't want ot mess up was my IP addressing that I had setup in Eero.  Now, if you have only 5 or 10 devices, this is really no big issue to fix after switching over, but my network regularly reports 80 to 90 devices due to all of my VMs, containers, IoT devices, and so on.  And, I would imagine many of you have a growing number of devices as well.

There are some terrific tools out there for finding IPs and identifying devices on your network, including the Router / DHCP server itself in many cases.  

In my case, however, Eero does not have a web application for keeping control over your network.  They only offer a mobile app.  They also have no way (at least today) of exporting the network device information.  So I needed another way.

Beyond that, I had an IP camera that I got, and when connectingn it up, I couldn't locate it on my network, and even when I connected directly to my machine via Ethernet, I could not find it.  I was baffled.  Then I read a post by a person who said he found that the device came to him with a statically set IP on a weird subnet.  He did not, however, mention what he used to finally find that IP.  

In my case, I was lucky enough to come across NetDiscover.

This tool is simply incredible, and is so easy to install.  

Installation

Simply use the appropriate repository for your LInux distro, and NetDiscover is likely there... in my case I used apt as my distro is Ubuntu based.

sudo apt install netdiscover -y

within seconds it was installed and ready to use.

If you used RedHat based distros, try RPM, YUM, or DNF.

For Open Suse, you'll want to try Zypper, and so on.

Usage

Once installed, you can start Netdiscover with many different flags.

If you are just trying to identify devices on your network, then use a command like

sudo netdiscover -r <your ip range: example 192.168.1.0/24>

You can add other flags as well, to make your output even better.  You can use the lowercase 'p' to tell netdiscover not to actively ping a host, but instead to simply sniff network traffic an show results as they are found.

sudo netdiscover -p -r <your ip range>

You can get the results in a more Parsable format with

sudo netdiscover -p -P -r <your ip range>

Or, in the case of me looking for a camera on an ukknown IP in an unknown subnet, you can try this command.

sudo netdiscover -S -f -i <your interface name>

Where <your interface name> will be something like etho0, or eno1, or enp2s0, etc.  You can see your various interface names with the command:

ip a show

Now, you've got the tools to find all your devices, and see what's on your network in a simple, powerful, and fast tool.

Support my Content and Channel

Support my Channel and ongoing efforts through Patreon:
https://www.patreon.com/bePatron?u=234177

Pi-Alert

Pi-Alert

Pi-Alert - Network Device Discovery and Change Notifications

One of the things i really like about Eero was a notification about a new device joining my network.  I think it was really more based on a new lease being pulled from DHCP, but still it let me know when Family members or friends came by and got close enough to the network for their phones to join it.  Kind of an early warning notification.  

The real benefit to a system like this, is notification of a device on your network you aren't expecting or aware of. After moving to OPNSense as my Router / Firewall, and DD-WRT for my Wired / Wireless Access Points, I realized I kind of missed that feature of Eero.  Started looking around the web, and came across Pi-Alert.  A really simple network monitoring tool that can run on a Raspberry PI (or in my case on a LXC container running Debian 11 Bullseye), that simply looks at your arp tables and watches for changes between scans.  When it finds a change it sends an email to you as a notification.

It also has a really clean, simple interface that you can use for checking in as well.  As a bonus, it comes with the option to install Pi-hole to help you keep your network as ad-free as possible.

Installing Pi-Alert

What You'll Need

Initial Setup

First, you'll need to make sure your chosen server is setup and ready to go. I personally setup a Debian 11 server in an LXC Container, but you can run this on any Linux machine most likely.   As stated in the name, you can also run it ona Raspberry Pi.  I suggest a Pi 4 if possible, but you can probabaly run it on a Pi 3 as well.

SSH Access

Wherever you run it, you'll want SSH access, so make sure to get that setup for your system.  There are too many ways and options for me to go into it, but do a quick web search and you'll find hundreds (if not thousands) of results on getting SSH access to your chosen server.

Curl Install

It's important that you have Curl installed on your server, as this is how you get the Pi-Alert install script to run it.  I also like to install the wget and git tools as well, so let's just install them altogether.

sudo apt install curl wget git -y

Installing Pi-Alert

Now we can run the Pi-alert install script with the command:

curl -sSL https://github.com/pucherot/Pi.Alert/raw/main/install/pialert_install.sh | bash


If you are saying, "Hold on!  I'm not comfortable just blindly running some script."  I hear you on that.  You can check out the script by going to this web address if you prefer.

https://github.com/pucherot/Pi.Alert/raw/main/install/pialert_install.sh

Once the script starts to run, you can move through the installation wizard with relative easy.

In most cases I answered 'Yes' to any questions that were Yes/No, and I did opt to setup Pi-Hole on the server as well, but you are not required to do that.  Additionally, I did setup SMTP for email alerts, but again, you are not required to set this up.

Post Install

After your install completes, you'll get some information from Pihole as well as PiAlert.  You'll want to make note of the URLs used to access those sites on your network, as well as the initial password for your Pi-hole install if you choose to install it.

If you didn't get the Pi-hole password, you can change the Web Admin password for Pi-hole with the command:

pihole -a -p

Then enter your desired new password and confirm it when prompted.

Check out the video linked at the top for a detailed walk through of the install, as well as an overview of the PIAlert web interface.

Support My Channel

Support my Channel and ongoing efforts through Patreon: https://www.patreon.com/bePatron?u=234177