在Docker上使用Nmap进行主机发现的结果很奇怪

问题描述

我尝试在我的家庭网络上执行主机发现,但我不知道Docker是否无法很好地执行此操作,或者是否需要某些网络配置。
如果我尝试执行此docker run --rm uzyexe/nmap -v -sn 192.168.1.*(为简单起见,我正在使用此映像,则尝试在另一个容器上安装Nmap却无济于事),它将所有主机报告为up:

Initiating Ping Scan at 19:02                                           
Scanning 256 hosts [4 ports/host]                                       
Completed Ping Scan at 19:03,9.25s elapsed (256 total hosts)           
Initiating Parallel DNS resolution of 256 hosts. at 19:03               
Completed Parallel DNS resolution of 256 hosts. at 19:03,14.74s elapsed
Nmap scan report for 192.168.1.0                                                                                
Host is up (0.0048s latency).                                           
Nmap scan report for 192.168.1.1                                        
Host is up (0.0030s latency).                                           
Nmap scan report for 192.168.1.2                                        
Host is up (0.0028s latency).                                           
Nmap scan report for 192.168.1.3                                        
Host is up (0.0038s latency).                                           
Nmap scan report for 192.168.1.4                                        
Host is up (0.0038s latency).                                           
Nmap scan report for 192.168.1.5                                        
Host is up (0.0038s latency).                                           
Nmap scan report for 192.168.1.6                                        
Host is up (0.0018s latency).                                           
Nmap scan report for 192.168.1.7                                        
Host is up (0.0018s latency).                                           
Nmap scan report for 192.168.1.8                                        
Host is up (0.0018s latency).                                           
Nmap scan report for 192.168.1.9       
(snip)     
Read data files from: /usr/bin/../share/nmap
Nmap done: 256 IP addresses (256 hosts up) scanned in 24.03 seconds
           Raw packets sent: 1656 (62.028KB) | Rcvd: 259 (10.228KB)                            

显然不是。我还对网桥网络适配器上的Virtualbox VM进行了测试,它报告了网络中主机的正确数量。 Nmap的其他功能运行良好,但我想知道如何执行主机发现部分。
如果我正确地认为此容器在网桥驱动程序上运行,并且可以肯定地扫描网络中的主机。 有人对正在发生的事情有任何想法吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...