Questions tagged [nmap]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
24 views

How to scan range of tcp and udp ports at a time using nmap?

I tried this command but its not scanning udp ports... nmap --open -p T:22,25,53,80,111,443,465,587,953,993,995,3306,5666,8891,U:53,68,111,323,715 13.235.13.13 What is the correct way for scanning ...
0
votes
1answer
24 views

How to open ports to test nmap script?

I need to test my nmap script, which crashes when many ports are open. So I need a script (python/bash) that opens n ports on a server. How could I do that? Thank you
0
votes
1answer
26 views

assign nmap output to several variables

I am using nmap to scan my network and want to show every device that is up. The following works great: ips=$(nmap -sn 192.168.1.68/24 -oG - | awk '/Up$/{print $2, $3}') What I now want to to is to ...
0
votes
1answer
56 views

How would I go about adding new data to a file?

So! I have an nmap scan that saves the output to a file, nmapscan.txt: sudo nmap -sP 192.168.1* > nmapscan.txt I also have a few other commands to clean up and save all desired output to one file,...
1
vote
2answers
41 views

How to run Bash Script in background [duplicate]

I am remotely connected to a system using ssh and want to run nmap on a system from there. But every 5 minutes, my SSH connection breaks and so the process running on my shell stops. How can I run ...
0
votes
1answer
24 views

I can't access application on azure Ubuntu VM that relies on port 8080, 8000, and 8009. Nmap tells me they are opened

I am using Ubuntu virtual host to run a tomcat based application that uses the ports 8080, 8009, and 8000. The network admin has already opened the ports and when I run nmap on localhost it shows that ...
0
votes
1answer
40 views

Need to determine if firewall is blocking an outbound connection

I don't have direct control over the firewall. I'm trying to troubleshoot a connection to a SFTP site from a Unix machine. Pinging the host results in a timeout, and nmap is telling me the host may be ...
0
votes
1answer
39 views

How can I port scan a host from itself without using the loopback interface?

I'm trying to audit firewall rules on a host. This is typically pretty straightforward to do with nmap or a similar scanning tool. The problem is that I can only run the audit on the host itself. ...
0
votes
1answer
13 views

Multiple tcp scanning tools integration

I recently started my first programming project that consist of purpose multiple tcp scanning tools integration for multiple usage. To be more clear, I want to incorporate NMAP and MASSCAN tools. But, ...
0
votes
1answer
100 views

How can I ran nmap script on a Mac OS X?

I've installed nmap in my Mac OS X tried. I'm not on Linux, I couldn't find the script directory. I ran sudo nmap -sV --script vulners 69.164.220.111 Password: I kept getting Starting Nmap 6....
0
votes
1answer
92 views

AWK concatenate output lines while extracting specific strings

Given the output of nmap against a subnet Nmap scan report for 192.168.1.20 Host is up (0.010s latency). MAC Address: EC:13:B2:E2:20:48 (Netonix) Nmap scan report for 192.168.1.21 Host is up (0.010s ...
0
votes
2answers
454 views

separating an array into comma separated values

I have a small snippet which gives me some ips of my current network: #!/bin/bash read -p "network:" network data=$(nmap -sP $network | awk '/is up/ {print up}; {gsub (/\(|\)/,""); up = $NF}') it ...
0
votes
1answer
36 views

NMAP shows open ports even tough I installed the UFW firewall

I have a VServer, in which I installed the firewall UFW. I scanned the Server with NMAP but I it showed a lot open Ports, which I didnt open. Is it a Bug? Or did I installed UFW false? Thank you ufw ...
1
vote
0answers
45 views

2 command nmap in the same line

Hello everyone and thanks for your help I am using this nmap command to obtain host and IP information if port 80 is open. nmap -sV -iL test.txt | grep "Service information:" ; nmap --open -p 80 ...
1
vote
2answers
374 views

What is scanning udp ports 8610-8612 on Debian Buster?

I've got several computers with Debian Buster (Gnome) installed. Thanks to psad tool I realized that all of them frequently (at least several times a day) scan udp ports 8610-8612 in the local network....
1
vote
1answer
537 views

How to run nmap from inside a chroot?

While I am trying to run nmap with privilege this message is showing: nmap: netutil.cc:3285: int route_dst_netlink(const sockaddr_storage*, route_nfo*, const char*, const sockaddr_storage*): ...
0
votes
1answer
351 views

Find IP address of poe devices attached to my computer via ethernet

I'm currently trying to setup zoneminder on my computer that has Ubuntu as a host OS. Before I do all that, I want to know if the poe CCTV camera I purchased works, a Reolink RLC410-5MP There are ...
0
votes
1answer
130 views

Understanding the Netcat properly [closed]

Netcat confuses me a little bit and here are the reasons: when I run: nmap localhost There are some ports listed with the information whether they are open or closed. So if I run the command : nc -l -...
-1
votes
1answer
103 views

How can fragment packets -f/--mtu be usefull?

How can fragment packets -f/--mtu be usefull ? That is, say from a normal scan I get for a given IP and port range: 28/tcp filtered unknown no-response 29/tcp filtered msg-icp no-response 30/tcp ...
0
votes
1answer
34 views

List all accessible ports from private network

I am connected to internet via the wifi provided by an Airport. I can't connect via SSH to my server. So, Airport may block port 22. Is there a way to use nmap to list all ports I can access through ...
0
votes
2answers
94 views

What's the NSE of nmap?

When I use nmap for scanning IP, there prints logs: Starting Nmap 7.70 ( https://nmap.org ) at 2019-04-05 10:27 ?D1ú±ê×?ê±?? NSE: Loaded 148 scripts for scanning. NSE: Script Pre-scanning. ...
0
votes
1answer
315 views

Does `nmap -p0-65535 0.0.0.0` scan all the IP addresses on the local host?

Does nmap -p0-65535 0.0.0.0 scan all the tcp ports on any of the IP addresses on the local host, so report services listening at the tcp ports at any of the local IP addresses including 192.168.1.97 ...
7
votes
4answers
1k views

why `nmap 192.168.1.97` returns less services than `nmap 127.0.0.1`? [duplicate]

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....
2
votes
3answers
341 views

How to scan my computer's UDP ports

What command can I use to port scan UDP? I hear that UDP scanning has some specific issues, that do not apply to TCP scanning. I tried running sudo nmap -p0-65535 -sU 192.168.1.97. But it has been ...
2
votes
3answers
740 views

How to SSH into Raspberry Pi connected via Ethernet on CentOS7?

I am trying to SSH into my Raspberry Pi 3 Model B V1.2 from my laptop running CentOS7. I have connected them together via Ethernet cable but the laptop is unable to identify Raspi. So i tried running ...
1
vote
1answer
330 views

What are those “unknown” services listed by nmap?

I run nmap on a Lubuntu machine using its own private IP address. What are those "unknown" services? How can I find them out? Is fuser supposed to find that out? Thanks. $ nmap -p0-65535 192.168....
0
votes
1answer
440 views

nmap output in CSV format sorted by IP address

I have this command which works well to give me a list of IP addresses, MAC addresses, and MAC vendor, sorted by IP address. sudo nmap -sn 192.168.103.0/24 | awk '/Nmap scan report for/{printf $5;}/...
2
votes
1answer
83 views

How can I find out information about a service?

$ nmap -p0-65535 192.168.0.142 Starting Nmap 7.60 ( https://nmap.org ) at 2019-03-10 17:53 EDT Nmap scan report for ocean (192.168.0.142) Host is up (0.000031s latency). Not shown: 65531 closed ports ...
6
votes
3answers
3k views

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....
0
votes
4answers
312 views

grep IPs and port number into one line

Using grep and cut I have returned the IP and ports of the nmap scan result which looks like this: 192.168.1.221 80 443 192.168.1.223 25 Desired output: 192.168.1.221:80 192.168.1.221:443 192.168....
0
votes
1answer
53 views

Exhaustive list of REASONs why a host/server might be down (nmap --reason)

I'd like to have reference on how to get exhaustive REASONs why a host/server might be down in "PORT STATE SERVICE REASON VERSION" (below) of nmap using the --reason option. --------------------------...
0
votes
1answer
1k views

strange error “(22 - 'Invalid argument')” when used with IPv4

I have "(22 - 'Invalid argument')" using nmap. I've googled and got https://seclists.org/nmap-dev/, but that is discussing IPv6 while I've got this error using IPv4. It makes no mention of IPv4, so ...
1
vote
1answer
1k views

Ports not really open after firewalld command

OS: CentOS 7 This is a question that is bordering on two issues. I have a docker machine running where I recently installed the PLEX container from linuxserver/plex. The current problem is that I ...
-2
votes
2answers
93 views

How make a port appear open with an nmap scan

To avoid someone knowing which port are open on my machine, I thought it would useful to open all unused port so that the nmaper is unable to identify which port are really open. How make a port ...
0
votes
1answer
80 views

Scan network with Linux kernel command

Does Linux kernel provide some utility familiar to nmap for simple network scanning to discover attached nodes?
0
votes
3answers
61 views

count matching open ports in a network log file

I have network log file like this one: Nmap scan report for 192.168.1.51 Host is up. PORT STATE SERVICE 80/tcp open http 443/tcp open https 8080/tcp open http-proxy 443/tcp ...
1
vote
1answer
84 views

Get web page from a list of ip addresses in a file

I have a list of ip addresses in a file, we can call that file ip.txt I scanned a subnet using zmap at port 80. So I have about 100 addresses returned into that file. Instead of popping each ip into ...
0
votes
1answer
185 views

nmap bypass iptables rules | Redhat 5.6 [closed]

I have legacy system on Redhat Linux 5.6, with Nmap 4.11. ( IP: 10.11.4.22 ). I want to block access from this legacy system via every port/protocols to another server( IP: 10.11.4.24 ). I first ...
0
votes
1answer
106 views

Filtering nmap scan and outputting ip:port format

Host: 1.1.1.1 () Ports: 8080/open/tcp//http-proxy/// Ignored State: filtered (28) Host: 2.2.2.2 () Ports: 8888/open/tcp//sun-answerbook/// Ignored State: closed (28) Host: 3.3.3.3 () Ports: 1263/...
1
vote
3answers
1k views

NMAP network scan shows IP-addresses and MAC addresses of items that are then missing from a subsequent arp-cache dump?

The logic I have is this get the definition of the subnet use nmap to scan every item in the subnet to populate the arp cache use the /usr/sbin/arp tool to dump the arp cache parse the arp-cache to ...
1
vote
2answers
1k views

ARP hostnames problem

I am having problem with viewing hostnames of devices located in my LAN. On my first laptop (Ubuntu 18.04 LTS Desktop edition) result of following command: arp -a Is exactly what I want: X (192.168....
0
votes
2answers
58 views

How to specify nmap to add redirect address?

I'm trying to ping the health of VM's using nmap utility. # nmap -v -n -sP 192.168.102.116 Host 192.168.102.116 appears to be down. Note: Host seems down. If it is really up, but blocking our ping ...
0
votes
1answer
1k views

How does a half-open scan work in Nmap?

Here in Nmap we have -sS option, which starts a "half-open scan." ➜ ~ sudo nmap -sS 192.168.1.4 Password: Starting Nmap 7.70 ( https://nmap.org ) at 2018-07-04 20:23 CST Nmap scan ...
0
votes
2answers
619 views

Use awk to print only the IP and OPEN ports field

I'd like to print only the IP address and open ports field from a given a gnmap file. Host: 123.123.123.123 () Ports: 80/open/tcp//http?///, 443/open/tcp//https?///, 8083/closed/tcp//us-srv///, ...
2
votes
2answers
2k views

Difference between -sn and -sL in Nmap?

Here as man page says, "-sn: Ping Scan - disable port scan", and "-sL: List Scan - simply list targets to scan" I Tried this: ➜ ~ sudo nmap -sn scanme.nmap.org Starting Nmap 7.70 ( https://...
-1
votes
1answer
4k views

Opening port in iptables [duplicate]

I tried iptables -I INPUT -p tcp -m tcp --dport 4444 -j ACCEPT to open a port but still closed: $ nmap hostname -p 4444 Starting Nmap 7.70 ( https://nmap.org ) at 2018-05-23 04:47 +0430 Nmap scan ...
4
votes
4answers
1k views

nmap to awk to sed. is there a better way?

I have a project where I know a single computer and a single printer will be the only things on the network. What I want to do is detect when the printer is connected to the network. I also know that ...
2
votes
6answers
19k views

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 ...
1
vote
0answers
460 views

Shell command on terminal vs system() call

I am using NMAP for port scanning on a host. When I run the following command on terminal, it gives the results within a minute most of the times. $ nmap -p 1-65535 10.180.5.237 | awk --posix '{ ...
4
votes
3answers
811 views

Understanding suspicious SSH commands

I have a dedicated hosting server that has few websites running. I recently accessed my server thru terminal cmd line and noticed that the last few commands that were executed look suspicious and I'm ...