nmap没有find有ping扫描的活动主机

我尝试使用nmap扫描我的本地networking,但似乎没有find确定活着的机器。 它响应ping,但ping扫描。

ping结果:

$ ping 192.168.0.2 PING 192.168.0.2 (192.168.0.2): 56 data bytes 64 bytes from 192.168.0.2: icmp_seq=0 ttl=64 time=1.585 ms 

并输出tcpdump:

 $ tcpdump -i fxp0 -n host 192.168.0.2 12:43:07.624911 IP 192.168.0.222 > 192.168.0.2: ICMP echo request, id 61023, seq 0, length 64 12:43:07.625029 IP 192.168.0.2 > 192.168.0.222: ICMP echo reply, id 61023, seq 0, length 64 

但是当我尝试使用nmap时,尽pipe收到了回应,但并没有看到它。

 $ nmap -sn 192.168.0.2 Starting Nmap 5.61TEST5 ( http://nmap.org ) at 2012-05-13 12:44 CEST Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn Nmap done: 1 IP address (0 hosts up) scanned in 3.02 seconds 

Tcpdump输出:

 $ tcpdump -i fxp0 -n host 192.168.0.2 12:45:30.742933 IP 192.168.0.222 > 192.168.0.2: ICMP echo request, id 2715, seq 0, length 8 12:45:30.742974 IP 192.168.0.222.36388 > 192.168.0.2.443: S 3607279099:3607279099(0) win 1024 <mss 1460> 12:45:30.743001 IP 192.168.0.222.36388 > 192.168.0.2.80: . ack 3607279099 win 1024 12:45:30.743025 IP 192.168.0.222 > 192.168.0.2: ICMP time stamp query id 45449 seq 0, length 20 12:45:30.743061 IP 192.168.0.2 > 192.168.0.222: ICMP echo reply, id 2715, seq 0, length 8 12:45:30.743097 IP 192.168.0.2.443 > 192.168.0.222.36388: S 2602942480:2602942480(0) ack 3607279100 win 5840 <mss 1460> 12:45:30.743130 IP 192.168.0.222.36388 > 192.168.0.2.443: R 3607279100:3607279100(0) win 0 12:45:30.743134 IP 192.168.0.2.80 > 192.168.0.222.36388: R 3607279099:3607279099(0) win 0 12:45:30.743148 IP 192.168.0.2 > 192.168.0.222: ICMP time stamp reply id 45449 seq 0: org 00:00:00.000, recv 11:04:04.243, xmit 11:04:04.243, length 20 12:45:32.745245 IP 192.168.0.222 > 192.168.0.2: ICMP time stamp query id 48722 seq 0, length 20 12:45:32.745281 IP 192.168.0.222.36389 > 192.168.0.2.80: . ack 3607344634 win 1024 12:45:32.745307 IP 192.168.0.222.36389 > 192.168.0.2.443: S 3607344634:3607344634(0) win 1024 <mss 1460> 12:45:32.745340 IP 192.168.0.2 > 192.168.0.222: ICMP time stamp reply id 48722 seq 0: org 00:00:00.000, recv 11:04:06.245, xmit 11:04:06.245, length 20 12:45:32.745380 IP 192.168.0.2.80 > 192.168.0.222.36389: R 3607344634:3607344634(0) win 0 12:45:32.745401 IP 192.168.0.2.443 > 192.168.0.222.36389: S 2629695507:2629695507(0) ack 3607344635 win 5840 <mss 1460> 12:45:32.745421 IP 192.168.0.222.36389 > 192.168.0.2.443: R 3607344635:3607344635(0) win 0 12:45:32.745431 IP 192.168.0.222 > 192.168.0.2: ICMP echo request, id 38289, seq 0, length 8 12:45:32.745517 IP 192.168.0.2 > 192.168.0.222: ICMP echo reply, id 38289, seq 0, length 8 

为什么nmap说主机在响应请求时似乎停止运行

编辑

Nmap版本:

 $ nmap --version Nmap version 5.61TEST5 ( http://nmap.org ) Platform: i386-portbld-freebsd7.4 Compiled with: liblua-5.1.5 openssl-0.9.8q libpcre-8.30 libpcap-0.9.8 nmap-libdnet-1.12 ipv6 Compiled without: 

可以肯定的是,防火墙中的第一个过滤规则是:

 pass quick on fxp0 

刚刚在我的OpenBSD 5.1上试了一下。 是的,你有FreeBSD 7.4,但是我们正在谈论一个类似的野兽。

作为一个普通的用户, nmap -sn my.host返回Host seems down对我来说,即使我的testing机器肯定会作为一个普通的用户响应ping。

但是,以root nmap -sn my.hostnmap -sn my.host返回Host is up

看你的提示,你可能也试图nmap作为非root用户。 尝试如果nmap作为根。

编辑:刚刚开启了我的FreeBSD 9.0,那里的nmap ping扫描工作正常,作为非根。

我的第一个观察是, tcpdump -i fxp0正在转储到达tcpdump -i fxp0的数据包,但是nmap是作为用户空间进程运行的,因此一些事情可能会阻止nmap查看响应。

  1. 例如netfilter规则(用户iptables -t filter -n -L
  2. selinux (没有看到这个特殊的东西,但selinux总是一个很好的赌注,当愚蠢的事情发生
  3. 还要检查iptables nat表,确保iptables -t nat -n -L

我只是有这个问题,并从这里部分帮助解决它。

我用WiFiencryption狗设置了一个新的无头RaspberryPi,并编辑了SD卡,将我的WiFi凭证放在wpa_supplicant.conf中。

RPi启动并连接到WiFi就好了,但我的Ubuntu笔记本电脑上的nmap ping扫描没有find它,直到我做了两件事情:

  1. 使用sudo
  2. 添加了--disable-arp-ping选项