Find hosts/devices on the network
nmap -sP 192.168.0.1/24
To find out what devices are on the network you need to know the ip of the router.
Here are some common:
Scan for open ports
The most simple of commands to check for some standard ports is:
But that does not check all of the possible ports.
nmap -p 1-65535 192.168.0.164
Or decide what ports you do want to check.
Check what service uses a specific port
Let’s say we find some open ports. But the port is either to high to have a specific service. Or it is on a port that is not usually used for it. For example, a lot of people are moving their ssh to not be port 22 to avoid spam-attacks.
45061/tcp open unknown
So we just add the -sV flag.
sudo nmap -sV -p 45061 192.168.1.103
Here is the Nmap-documentation for it.