Questions tagged [nmap]

a free and open-source port scanner, operating system fingerprinter, and service fingerprinter

Nmap is a free and open-source port scanner, operating system fingerprinter, and service fingerprinter, fully extensible via the Lua-based Nmap Scripting Engine (NSE).

Here are some resources for answering Nmap questions:

207 questions
51
votes
3 answers

Why are some ports reported by nmap filtered and not the others?

I'm scanning a server which should have a pretty simple firewall using iptables: by default everything is DROPped besides RELATED and ESTABLISHED packets. The only type of NEW packets allowed are TCP packets on port 22 and 80 and that's it (no HTTPS…
Cedric Martin
  • 2,777
  • 6
  • 28
  • 32
41
votes
5 answers

How to close ports in Linux?

I have some question in closing port, I think I got some strange things. When I use execute nmap --top-ports 10 192.168.1.1 it shows that 23/TCP port is open. But when I execute nmap --top-ports 10 localhost it show that 23/tcp port is…
user74080
  • 513
  • 1
  • 4
  • 5
35
votes
5 answers

Can nmap display only hosts with specific ports open?

Can nmap list all hosts on the local network that have both SSH and HTTP open? To do so, I can run something like: nmap 192.168.1.1-254 -p22,80 --open However, this lists hosts that have ANY of the list ports open, whereas I would like hosts that…
Brian
  • 1,442
  • 1
  • 10
  • 13
27
votes
4 answers

Output only the IP addresses of the online machines with nmap

I know how to use nmap to find the list of hosts that are currently online. What I would like to do is get a list of just their IP addresses, now it displays extra information such as Nmap scan report for 192.168.x.x' and 'Host is up (0.12s…
Josh
24
votes
3 answers

How to "close" open ports?

A few days ago I started to care a lot about my data security, I end up nmaping myself with: nmap 127.0.0.1 Surprise, surprise, I have lots of active services listen to localhost: $ nmap 127.0.0.1 Starting Nmap 5.21 ( http://nmap.org ) at 2013-05-05…
RSFalcon7
  • 4,367
  • 6
  • 30
  • 56
24
votes
2 answers

nmap doesn't appear to list all open ports

My rental Linux server doesn't respond to nmap the way I thought it would. When I run nmap it shows three open ports: 80, 443 and 8080. However, I know ports 2083, 22 and 2222 should all be open, as they're used for the web-based C-Panel, SSH and…
Peter David Carter
  • 502
  • 2
  • 7
  • 29
16
votes
3 answers

Nmap -sn: scan or no scan?

The nmap man page has this to say about the -sn parameter: -sn (No port scan) . This option tells Nmap not to do a port scan after host discovery, and only print out the available hosts that responded to the scan. The first half of the…
dotancohen
  • 15,494
  • 26
  • 80
  • 116
13
votes
1 answer

What's the gnu-netcat's '-z' equivalent option in nmap-ncat?

I check for a listening port on a service prior to running a script using this : until nc -z $HOST $PORT do echo "waiting for service to be available..." sleep 0.5 done exec "/my/script" It used to work with gnu-netcat, but now, I've upgraded…
Enderson Maia
  • 231
  • 3
  • 7
11
votes
4 answers

How to protect against port scanners?

Is it possible to prevent nmap from observing my machine entirely? After dropping all incoming connections with iptables port scans return as "filtered". It'd prefer if nmap couldn't see what ports existed at all. Is this possible? The below…
spacemonkey
  • 111
  • 1
  • 1
  • 4
9
votes
3 answers

How many bytes occupy a simple nmap to a host?

Today the IT manager got angry because I used nmap on the 3 servers I manage to see what ports they had open. I know I could have used netstat inside the host' shell. He told me that "If the network goes down because of nmap I would be punished". I…
JorgeeFG
  • 725
  • 2
  • 9
  • 17
8
votes
3 answers

Difference between `nmap local-IP-address` and `nmap localhost`

The following IP address is for my network interface $ nmap 192.168.0.142 Starting Nmap 7.60 ( https://nmap.org ) at 2019-03-09 11:33 EST Nmap scan report for ocean (192.168.0.142) Host is up (0.00047s latency). Not shown: 996 closed ports PORT …
Tim
  • 98,580
  • 191
  • 570
  • 977
8
votes
1 answer

Nmap unable to resolve flags

When I type in the command nmap –Pn –sT -sV –p0-65535 192.168.1.100, my terminal responds: Starting Nmap 7.60 ( https://nmap.org ) at 2018-01-29 11:24 PST Failed to resolve "–Pn". Failed to resolve "–sT". Failed to resolve "–p0-65535". Nmap scan…
keala
  • 183
  • 1
  • 4
8
votes
1 answer

How does FING (or any of the IP/MAC Address Mappers) work?

Per this comment, I'm going to take advice and ask this as a separate question. I am trying to learn more about networking and security and want to play with tools to help increase my understanding. Fing seems like a pretty cool tool - finding…
akaphenom
  • 205
  • 3
  • 8
7
votes
4 answers

why `nmap 192.168.1.97` returns less services than `nmap 127.0.0.1`?

According to https://networkengineering.stackexchange.com/a/57909/, a packet sent to 192.168.1.97 "doesn't leave the host but is treated like a packet received from the network, addressed to 192.168.1.97." So same as sending a packet to loop back…
Tim
  • 98,580
  • 191
  • 570
  • 977
7
votes
6 answers

A way to find open ports on a host machine

I know that i can use nmap to see which ports are open on specific machine. But what i need is a way to get it from the host side itself. Currently, if i use nmap on one of my machines to check the other one, i get for an example: smb:~# nmap…
TheSebM8
  • 459
  • 2
  • 8
  • 18
1
2 3
13 14