I have a question to write a script using nmap to look at TCP ports across the entire network to identify which IP addresses are running any of those services.
Sorry my english is not good.
I have a question to write a script using nmap to look at TCP ports across the entire network to identify which IP addresses are running any of those services.
Sorry my english is not good.
What you want to do is this:
nmap -p 53,123 192.168.0.0/24
-p specifies list of comma-separated ports.192.168.0.0/24 tells to scan local network in CIDR notation. Please note that if you are scanning a local network, you need to know what type it is; for example /24 means there are 2^(32-24) - 1 = 255 possible host addresses ( and if you exclude router, broadcast, and network ID there are 3 less addresses ). Use ip addr -o to find on what network you are on.Of course, you can use other options in combination with this to perform various types of scans.
man nmap. That kind of thing is whatnmapwas designed for. Warning: Depending on what you mean by "across the entire network", you could be on the edge of illegal behaviour. Ensure the the network manager is aware, and approves. A Port Scan is often a precursor to an attack. Don't trigger a response - get approval first. – waltinator Dec 21 '16 at 15:23