Skip to content

"dnet: Failed to open device en0" on macOS #3127

Closed

Description

@bl-nero

Describe the bug
nmap fails to execute any search against local network IP addresses with a message: "dnet: Failed to open device en0".

To Reproduce

~> sudo nmap -sS 192.168.1.39
Starting Nmap 7.97 ( https://nmap.org ) at 2025-05-31 09:41 +0200
dnet: Failed to open device en0
QUITTING!

I tried multiple scans and targets from the local network. At the same time, sudo nmap -sS scanme.nmap.org works as expected.

Expected behavior
A scan should be performed.

Version info (please complete the following information):

  • OS: macOS 15.5 (24F74)
  • Output of nmap --version:
Nmap version 7.97 ( https://nmap.org )
Platform: x86_64-apple-darwin21.6.0
Compiled with: nmap-liblua-5.4.7 openssl-3.0.16 libssh2-1.11.1 libz-1.3.1 libpcre2-10.45 libpcap-1.10.5 nmap-libdnet-1.18.0 ipv6
Compiled without:
Available nsock engines: kqueue poll select
  • Output of nmap --iflist
Starting Nmap 7.97 ( https://nmap.org ) at 2025-05-31 09:48 +0200
************************INTERFACES************************
DEV     (SHORT)   IP/MASK                                 TYPE        UP   MTU   MAC
lo0     (lo0)     127.0.0.1/8                             loopback    up   16384
lo0     (lo0)     ::1/128                                 loopback    up   16384
lo0     (lo0)     fe80::1/64                              loopback    up   16384
gif0    (gif0)    (none)/0                                point2point down 1280
stf0    (stf0)    (none)/0                                other       down 1280
anpi0   (anpi0)   (none)/0                                ethernet    up   1500  6E:EC:AE:6F:77:E1
anpi1   (anpi1)   (none)/0                                ethernet    up   1500  6E:EC:AE:6F:77:E2
anpi2   (anpi2)   (none)/0                                ethernet    up   1500  6E:EC:AE:6F:77:E3
en4     (en4)     (none)/0                                ethernet    up   1500  6E:EC:AE:6F:77:C1
en5     (en5)     (none)/0                                ethernet    up   1500  6E:EC:AE:6F:77:C2
en6     (en6)     (none)/0                                ethernet    up   1500  6E:EC:AE:6F:77:C3
en1     (en1)     (none)/0                                ethernet    up   1500  36:40:EA:DE:98:80
en2     (en2)     (none)/0                                ethernet    up   1500  36:40:EA:DE:98:84
en3     (en3)     (none)/0                                ethernet    up   1500  36:40:EA:DE:98:88
bridge0 (bridge0) (none)/0                                ethernet    up   1500  36:40:EA:DE:98:80
utun0   (utun0)   (none)/0                                point2point up   1500
utun0   (utun0)   fe80::65f9:f5cd:3bc4:ba0c/64            point2point up   1500
utun1   (utun1)   (none)/0                                point2point up   1380
utun1   (utun1)   fe80::4b66:804c:25f9:eae8/64            point2point up   1380
ap1     (ap1)     (none)/0                                ethernet    down 1500  3E:86:5F:BB:6F:6C
en0     (en0)     192.168.1.42/24                         ethernet    up   1500  BA:E9:C4:7A:98:CD
en0     (en0)     fe80::1c20:262d:fad3:57cb/64            ethernet    up   1500  BA:E9:C4:7A:98:CD
en0     (en0)     fd01:8bbd:839:206a:b7:fd80:4a98:8513/64 ethernet    up   1500  BA:E9:C4:7A:98:CD
awdl0   (awdl0)   (none)/0                                ethernet    up   1500  32:85:23:D1:3C:BC
awdl0   (awdl0)   fe80::3085:23ff:fed1:3cbc/64            ethernet    up   1500  32:85:23:D1:3C:BC
llw0    (llw0)    (none)/0                                ethernet    up   1500  32:85:23:D1:3C:BC
llw0    (llw0)    fe80::3085:23ff:fed1:3cbc/64            ethernet    up   1500  32:85:23:D1:3C:BC
utun2   (utun2)   (none)/0                                point2point up   2000
utun2   (utun2)   fe80::d976:a78f:da2:e310/64             point2point up   2000
utun3   (utun3)   (none)/0                                point2point up   1000
utun3   (utun3)   fe80::ce81:b1c:bd2c:69e/64              point2point up   1000

**************************ROUTES**************************
DST/MASK                         DEV   METRIC GATEWAY
45.33.32.193/32                  en0   0      192.168.1.1
45.33.32.195/32                  en0   0      192.168.1.1
2.16.238.8/32                    en0   0      192.168.1.1
45.33.32.196/32                  en0   0      192.168.1.1
2.20.33.166/32                   en0   0      192.168.1.1
45.33.32.197/32                  en0   0      192.168.1.1
3.123.149.45/32                  en0   0      192.168.1.1
3.126.145.18/32                  en0   0      192.168.1.1
5.75.231.96/32                   en0   0      192.168.1.1
5.78.100.21/32                   en0   0      192.168.1.1
13.50.180.192/32                 en0   0      192.168.1.1
13.227.146.75/32                 en0   0      192.168.1.1
16.170.124.74/32                 en0   0      192.168.1.1
17.8.130.25/32                   en0   0      192.168.1.1
17.8.130.144/32                  en0   0      192.168.1.1
17.23.18.34/32                   en0   0      192.168.1.1
17.32.194.2/32                   en0   0      192.168.1.1
17.32.194.34/32                  en0   0      192.168.1.1
17.36.200.79/32                  en0   0      192.168.1.1
17.57.146.54/32                  en0   0      192.168.1.1
17.57.146.55/32                  en0   0      192.168.1.1
17.137.162.3/32                  en0   0      192.168.1.1
17.138.175.254/32                en0   0      192.168.1.1
17.156.128.11/32                 en0   0      192.168.1.1
17.188.182.68/32                 en0   0      192.168.1.1
17.188.182.196/32                en0   0      192.168.1.1
17.248.213.64/32                 en0   0      192.168.1.1
17.248.213.65/32                 en0   0      192.168.1.1
17.248.213.66/32                 en0   0      192.168.1.1
17.248.213.67/32                 en0   0      192.168.1.1
17.248.213.68/32                 en0   0      192.168.1.1
17.248.213.69/32                 en0   0      192.168.1.1
17.248.213.70/32                 en0   0      192.168.1.1
17.248.213.71/32                 en0   0      192.168.1.1
17.253.14.123/32                 en0   0      192.168.1.1
17.253.14.251/32                 en0   0      192.168.1.1
17.253.38.253/32                 en0   0      192.168.1.1
17.253.73.53/32                  en0   0      192.168.1.1
17.253.73.201/32                 en0   0      192.168.1.1
17.253.73.202/32                 en0   0      192.168.1.1
17.253.73.203/32                 en0   0      192.168.1.1
17.253.73.204/32                 en0   0      192.168.1.1
17.253.73.205/32                 en0   0      192.168.1.1
17.253.73.206/32                 en0   0      192.168.1.1
17.253.73.207/32                 en0   0      192.168.1.1
17.253.77.204/32                 en0   0      192.168.1.1
17.253.150.10/32                 en0   0      192.168.1.1
18.244.102.20/32                 en0   0      192.168.1.1
18.244.102.38/32                 en0   0      192.168.1.1
18.244.149.53/32                 en0   0      192.168.1.1
23.48.0.23/32                    en0   0      192.168.1.1
23.48.0.160/32                   en0   0      192.168.1.1
23.48.0.175/32                   en0   0      192.168.1.1
23.48.0.201/32                   en0   0      192.168.1.1
34.98.72.95/32                   en0   0      192.168.1.1
34.104.35.123/32                 en0   0      192.168.1.1
34.111.8.32/32                   en0   0      192.168.1.1
34.111.170.203/32                en0   0      192.168.1.1
34.117.77.79/32                  en0   0      192.168.1.1
34.120.195.249/32                en0   0      192.168.1.1
34.120.253.250/32                en0   0      192.168.1.1
34.128.128.0/32                  en0   0      192.168.1.1
34.158.1.133/32                  en0   0      192.168.1.1
34.249.44.166/32                 en0   0      192.168.1.1
35.186.224.24/32                 en0   0      192.168.1.1
35.186.224.28/32                 en0   0      192.168.1.1
35.186.224.44/32                 en0   0      192.168.1.1
37.252.171.21/32                 en0   0      192.168.1.1
44.216.140.201/32                en0   0      192.168.1.1
45.33.32.0/32                    en0   0      192.168.1.1
45.33.32.1/32                    en0   0      192.168.1.1
45.33.32.2/32                    en0   0      192.168.1.1
45.33.32.3/32                    en0   0      192.168.1.1
45.33.32.4/32                    en0   0      192.168.1.1
45.33.32.5/32                    en0   0      192.168.1.1
45.33.32.6/32                    en0   0      192.168.1.1
45.33.32.7/32                    en0   0      192.168.1.1
45.33.32.8/32                    en0   0      192.168.1.1
45.33.32.9/32                    en0   0      192.168.1.1
45.33.32.10/32                   en0   0      192.168.1.1
45.33.32.11/32                   en0   0      192.168.1.1
45.33.32.12/32                   en0   0      192.168.1.1
45.33.32.13/32                   en0   0      192.168.1.1
45.33.32.14/32                   en0   0      192.168.1.1
45.33.32.15/32                   en0   0      192.168.1.1
45.33.32.16/32                   en0   0      192.168.1.1
45.33.32.17/32                   en0   0      192.168.1.1
45.33.32.18/32                   en0   0      192.168.1.1
45.33.32.19/32                   en0   0      192.168.1.1
45.33.32.20/32                   en0   0      192.168.1.1
45.33.32.21/32                   en0   0      192.168.1.1
45.33.32.22/32                   en0   0      192.168.1.1
45.33.32.23/32                   en0   0      192.168.1.1
45.33.32.24/32                   en0   0      192.168.1.1
45.33.32.25/32                   en0   0      192.168.1.1
45.33.32.26/32                   en0   0      192.168.1.1
45.33.32.27/32                   en0   0      192.168.1.1
45.33.32.28/32                   en0   0      192.168.1.1
45.33.32.29/32                   en0   0      192.168.1.1
45.33.32.30/32                   en0   0      192.168.1.1
45.33.32.31/32                   en0   0      192.168.1.1
45.33.32.32/32                   en0   0      192.168.1.1
45.33.32.33/32                   en0   0      192.168.1.1
45.33.32.34/32                   en0   0      192.168.1.1
45.33.32.35/32                   en0   0      192.168.1.1
45.33.32.36/32                   en0   0      192.168.1.1
45.33.32.37/32                   en0   0      192.168.1.1
45.33.32.38/32                   en0   0      192.168.1.1
45.33.32.39/32                   en0   0      192.168.1.1
45.33.32.40/32                   en0   0      192.168.1.1
45.33.32.41/32                   en0   0      192.168.1.1
45.33.32.42/32                   en0   0      192.168.1.1
45.33.32.43/32                   en0   0      192.168.1.1
45.33.32.44/32                   en0   0      192.168.1.1
45.33.32.45/32                   en0   0      192.168.1.1
45.33.32.46/32                   en0   0      192.168.1.1
45.33.32.47/32                   en0   0      192.168.1.1
45.33.32.48/32                   en0   0      192.168.1.1
45.33.32.49/32                   en0   0      192.168.1.1
45.33.32.50/32                   en0   0      192.168.1.1
45.33.32.51/32                   en0   0      192.168.1.1
45.33.32.52/32                   en0   0      192.168.1.1
45.33.32.53/32                   en0   0      192.168.1.1
45.33.32.54/32                   en0   0      192.168.1.1
45.33.32.55/32                   en0   0      192.168.1.1
45.33.32.56/32                   en0   0      192.168.1.1
45.33.32.57/32                   en0   0      192.168.1.1
45.33.32.58/32                   en0   0      192.168.1.1
45.33.32.59/32                   en0   0      192.168.1.1
45.33.32.60/32                   en0   0      192.168.1.1
45.33.32.61/32                   en0   0      192.168.1.1
45.33.32.62/32                   en0   0      192.168.1.1
45.33.32.63/32                   en0   0      192.168.1.1
45.33.32.64/32                   en0   0      192.168.1.1
45.33.32.65/32                   en0   0      192.168.1.1
45.33.32.66/32                   en0   0      192.168.1.1
45.33.32.67/32                   en0   0      192.168.1.1
45.33.32.68/32                   en0   0      192.168.1.1
45.33.32.69/32                   en0   0      192.168.1.1
45.33.32.70/32                   en0   0      192.168.1.1
45.33.32.71/32                   en0   0      192.168.1.1
45.33.32.72/32                   en0   0      192.168.1.1
45.33.32.73/32                   en0   0      192.168.1.1
45.33.32.74/32                   en0   0      192.168.1.1
45.33.32.75/32                   en0   0      192.168.1.1
45.33.32.76/32                   en0   0      192.168.1.1
45.33.32.77/32                   en0   0      192.168.1.1
45.33.32.78/32                   en0   0      192.168.1.1
45.33.32.79/32                   en0   0      192.168.1.1
45.33.32.80/32                   en0   0      192.168.1.1
45.33.32.81/32                   en0   0      192.168.1.1
45.33.32.82/32                   en0   0      192.168.1.1
45.33.32.83/32                   en0   0      192.168.1.1
45.33.32.84/32                   en0   0      192.168.1.1
45.33.32.85/32                   en0   0      192.168.1.1
45.33.32.86/32                   en0   0      192.168.1.1
45.33.32.87/32                   en0   0      192.168.1.1
45.33.32.88/32                   en0   0      192.168.1.1
45.33.32.89/32                   en0   0      192.168.1.1
45.33.32.90/32                   en0   0      192.168.1.1
45.33.32.91/32                   en0   0      192.168.1.1
45.33.32.92/32                   en0   0      192.168.1.1
45.33.32.93/32                   en0   0      192.168.1.1
45.33.32.94/32                   en0   0      192.168.1.1
45.33.32.95/32                   en0   0      192.168.1.1
45.33.32.96/32                   en0   0      192.168.1.1
45.33.32.97/32                   en0   0      192.168.1.1
45.33.32.98/32                   en0   0      192.168.1.1
45.33.32.99/32                   en0   0      192.168.1.1
45.33.32.100/32                  en0   0      192.168.1.1
45.33.32.101/32                  en0   0      192.168.1.1
45.33.32.102/32                  en0   0      192.168.1.1
45.33.32.103/32                  en0   0      192.168.1.1
45.33.32.104/32                  en0   0      192.168.1.1
45.33.32.105/32                  en0   0      192.168.1.1
45.33.32.106/32                  en0   0      192.168.1.1
45.33.32.107/32                  en0   0      192.168.1.1
45.33.32.108/32                  en0   0      192.168.1.1
45.33.32.109/32                  en0   0      192.168.1.1
45.33.32.110/32                  en0   0      192.168.1.1
45.33.32.111/32                  en0   0      192.168.1.1
45.33.32.112/32                  en0   0      192.168.1.1
45.33.32.113/32                  en0   0      192.168.1.1
45.33.32.114/32                  en0   0      192.168.1.1
45.33.32.115/32                  en0   0      192.168.1.1
45.33.32.116/32                  en0   0      192.168.1.1
45.33.32.117/32                  en0   0      192.168.1.1
45.33.32.118/32                  en0   0      192.168.1.1
45.33.32.119/32                  en0   0      192.168.1.1
45.33.32.120/32                  en0   0      192.168.1.1
45.33.32.121/32                  en0   0      192.168.1.1
45.33.32.122/32                  en0   0      192.168.1.1
45.33.32.123/32                  en0   0      192.168.1.1
45.33.32.124/32                  en0   0      192.168.1.1
45.33.32.125/32                  en0   0      192.168.1.1
45.33.32.126/32                  en0   0      192.168.1.1
45.33.32.127/32                  en0   0      192.168.1.1
45.33.32.128/32                  en0   0      192.168.1.1
45.33.32.129/32                  en0   0      192.168.1.1
45.33.32.130/32                  en0   0      192.168.1.1
45.33.32.131/32                  en0   0      192.168.1.1
45.33.32.132/32                  en0   0      192.168.1.1
45.33.32.133/32                  en0   0      192.168.1.1
45.33.32.134/32                  en0   0      192.168.1.1
45.33.32.135/32                  en0   0      192.168.1.1
45.33.32.136/32                  en0   0      192.168.1.1
45.33.32.137/32                  en0   0      192.168.1.1
45.33.32.138/32                  en0   0      192.168.1.1
45.33.32.139/32                  en0   0      192.168.1.1
45.33.32.140/32                  en0   0      192.168.1.1
45.33.32.141/32                  en0   0      192.168.1.1
45.33.32.142/32                  en0   0      192.168.1.1
45.33.32.143/32                  en0   0      192.168.1.1
45.33.32.144/32                  en0   0      192.168.1.1
45.33.32.145/32                  en0   0      192.168.1.1
45.33.32.146/32                  en0   0      192.168.1.1
45.33.32.147/32                  en0   0      192.168.1.1
45.33.32.148/32                  en0   0      192.168.1.1
45.33.32.149/32                  en0   0      192.168.1.1
45.33.32.150/32                  en0   0      192.168.1.1
45.33.32.151/32                  en0   0      192.168.1.1
45.33.32.152/32                  en0   0      192.168.1.1
45.33.32.153/32                  en0   0      192.168.1.1
45.33.32.154/32                  en0   0      192.168.1.1
45.33.32.155/32                  en0   0      192.168.1.1
45.33.32.156/32                  en0   0      192.168.1.1
45.33.32.157/32                  en0   0      192.168.1.1
45.33.32.158/32                  en0   0      192.168.1.1
45.33.32.159/32                  en0   0      192.168.1.1
45.33.32.160/32                  en0   0      192.168.1.1
45.33.32.161/32                  en0   0      192.168.1.1
45.33.32.162/32                  en0   0      192.168.1.1
45.33.32.163/32                  en0   0      192.168.1.1
45.33.32.164/32                  en0   0      192.168.1.1
45.33.32.165/32                  en0   0      192.168.1.1
45.33.32.166/32                  en0   0      192.168.1.1
45.33.32.167/32                  en0   0      192.168.1.1
45.33.32.168/32                  en0   0      192.168.1.1
45.33.32.169/32                  en0   0      192.168.1.1
45.33.32.170/32                  en0   0      192.168.1.1
45.33.32.171/32                  en0   0      192.168.1.1
45.33.32.172/32                  en0   0      192.168.1.1
45.33.32.173/32                  en0   0      192.168.1.1
45.33.32.174/32                  en0   0      192.168.1.1
45.33.32.175/32                  en0   0      192.168.1.1
45.33.32.176/32                  en0   0      192.168.1.1
45.33.32.177/32                  en0   0      192.168.1.1
45.33.32.178/32                  en0   0      192.168.1.1
45.33.32.179/32                  en0   0      192.168.1.1
45.33.32.180/32                  en0   0      192.168.1.1
45.33.32.181/32                  en0   0      192.168.1.1
45.33.32.182/32                  en0   0      192.168.1.1
45.33.32.183/32                  en0   0      192.168.1.1
45.33.32.184/32                  en0   0      192.168.1.1
45.33.32.185/32                  en0   0      192.168.1.1
45.33.32.186/32                  en0   0      192.168.1.1
45.33.32.187/32                  en0   0      192.168.1.1
45.33.32.188/32                  en0   0      192.168.1.1
45.33.32.189/32                  en0   0      192.168.1.1
45.33.32.190/32                  en0   0      192.168.1.1
45.33.32.191/32                  en0   0      192.168.1.1
45.33.32.192/32                  en0   0      192.168.1.1
45.33.32.194/32                  en0   0      192.168.1.1
2.16.238.26/32                   en0   0      192.168.1.1
2.20.34.33/32                    en0   0      192.168.1.1
2.21.20.141/32                   en0   0      192.168.1.1
45.33.32.198/32                  en0   0      192.168.1.1
45.33.32.199/32                  en0   0      192.168.1.1
45.33.32.200/32                  en0   0      192.168.1.1
45.33.32.201/32                  en0   0      192.168.1.1
45.33.32.202/32                  en0   0      192.168.1.1
45.33.32.203/32                  en0   0      192.168.1.1
45.33.32.204/32                  en0   0      192.168.1.1
45.33.32.205/32                  en0   0      192.168.1.1
45.33.32.206/32                  en0   0      192.168.1.1
45.33.32.207/32                  en0   0      192.168.1.1
45.33.32.208/32                  en0   0      192.168.1.1
45.33.32.209/32                  en0   0      192.168.1.1
45.33.32.210/32                  en0   0      192.168.1.1
45.33.32.211/32                  en0   0      192.168.1.1
45.33.32.212/32                  en0   0      192.168.1.1
45.33.32.213/32                  en0   0      192.168.1.1
45.33.32.214/32                  en0   0      192.168.1.1
45.33.32.215/32                  en0   0      192.168.1.1
45.33.32.216/32                  en0   0      192.168.1.1
45.33.32.217/32                  en0   0      192.168.1.1
45.33.32.218/32                  en0   0      192.168.1.1
45.33.32.219/32                  en0   0      192.168.1.1
45.33.32.220/32                  en0   0      192.168.1.1
45.33.32.221/32                  en0   0      192.168.1.1
45.33.32.222/32                  en0   0      192.168.1.1
45.33.32.223/32                  en0   0      192.168.1.1
45.33.32.224/32                  en0   0      192.168.1.1
45.33.32.225/32                  en0   0      192.168.1.1
45.33.32.226/32                  en0   0      192.168.1.1
45.33.32.227/32                  en0   0      192.168.1.1
45.33.32.228/32                  en0   0      192.168.1.1
45.33.32.229/32                  en0   0      192.168.1.1
45.33.32.230/32                  en0   0      192.168.1.1
45.33.32.231/32                  en0   0      192.168.1.1
45.33.32.232/32                  en0   0      192.168.1.1
45.33.32.233/32                  en0   0      192.168.1.1
45.33.32.234/32                  en0   0      192.168.1.1
45.33.32.235/32                  en0   0      192.168.1.1
45.33.32.236/32                  en0   0      192.168.1.1
45.33.32.237/32                  en0   0      192.168.1.1
45.33.32.238/32                  en0   0      192.168.1.1
45.33.32.239/32                  en0   0      192.168.1.1
45.33.32.240/32                  en0   0      192.168.1.1
45.33.32.241/32                  en0   0      192.168.1.1
45.33.32.242/32                  en0   0      192.168.1.1
45.33.32.243/32                  en0   0      192.168.1.1
45.33.32.244/32                  en0   0      192.168.1.1
45.33.32.245/32                  en0   0      192.168.1.1
45.33.32.246/32                  en0   0      192.168.1.1
45.33.32.247/32                  en0   0      192.168.1.1
45.33.32.248/32                  en0   0      192.168.1.1
45.33.32.249/32                  en0   0      192.168.1.1
45.33.32.250/32                  en0   0      192.168.1.1
45.33.32.251/32                  en0   0      192.168.1.1
45.33.32.252/32                  en0   0      192.168.1.1
45.33.32.253/32                  en0   0      192.168.1.1
45.33.32.254/32                  en0   0      192.168.1.1
45.33.32.255/32                  en0   0      192.168.1.1
50.116.1.184/32                  en0   0      192.168.1.1
52.53.110.180/32                 en0   0      192.168.1.1
54.152.49.138/32                 en0   0      192.168.1.1
54.225.188.122/32                en0   0      192.168.1.1
74.125.100.73/32                 en0   0      192.168.1.1
79.127.216.112/32                en0   0      192.168.1.1
80.80.80.80/32                   en0   0      192.168.1.1
91.107.141.152/32                en0   0      192.168.1.1
91.107.148.202/32                en0   0      192.168.1.1
91.228.74.159/32                 en0   0      192.168.1.1
91.228.153.47/32                 en0   0      192.168.1.1
91.228.153.235/32                en0   0      192.168.1.1
95.100.111.187/32                en0   0      192.168.1.1
95.100.111.208/32                en0   0      192.168.1.1
95.100.111.226/32                en0   0      192.168.1.1
95.100.111.233/32                en0   0      192.168.1.1
99.83.181.31/32                  en0   0      192.168.1.1
103.203.84.144/32                en0   0      192.168.1.1
104.16.79.73/32                  en0   0      192.168.1.1
104.16.80.73/32                  en0   0      192.168.1.1
104.16.174.226/32                en0   0      192.168.1.1
104.16.175.226/32                en0   0      192.168.1.1
104.18.25.18/32                  en0   0      192.168.1.1
104.18.34.222/32                 en0   0      192.168.1.1
104.18.65.57/32                  en0   0      192.168.1.1
104.26.10.240/32                 en0   0      192.168.1.1
104.85.249.211/32                en0   0      192.168.1.1
104.85.249.232/32                en0   0      192.168.1.1
104.91.48.149/32                 en0   0      192.168.1.1
108.177.119.84/32                en0   0      192.168.1.1
108.179.139.10/32                en0   0      192.168.1.1
127.0.0.1/32                     lo0   0      127.0.0.1
140.82.112.22/32                 en0   0      192.168.1.1
140.82.112.26/32                 en0   0      192.168.1.1
140.82.113.21/32                 en0   0      192.168.1.1
140.82.113.22/32                 en0   0      192.168.1.1
140.82.121.3/32                  en0   0      192.168.1.1
140.82.121.4/32                  en0   0      192.168.1.1
140.82.121.5/32                  en0   0      192.168.1.1
140.82.121.6/32                  en0   0      192.168.1.1
140.82.121.33/32                 en0   0      192.168.1.1
142.250.75.2/32                  en0   0      192.168.1.1
142.250.75.3/32                  en0   0      192.168.1.1
142.250.75.8/32                  en0   0      192.168.1.1
142.250.75.10/32                 en0   0      192.168.1.1
142.250.75.14/32                 en0   0      192.168.1.1
142.250.75.17/32                 en0   0      192.168.1.1
142.250.153.207/32               en0   0      192.168.1.1
142.250.186.194/32               en0   0      192.168.1.1
142.250.186.195/32               en0   0      192.168.1.1
142.250.186.196/32               en0   0      192.168.1.1
142.250.186.197/32               en0   0      192.168.1.1
142.250.186.198/32               en0   0      192.168.1.1
142.250.186.202/32               en0   0      192.168.1.1
142.250.186.206/32               en0   0      192.168.1.1
142.250.186.209/32               en0   0      192.168.1.1
142.250.203.129/32               en0   0      192.168.1.1
142.250.203.130/32               en0   0      192.168.1.1
142.250.203.131/32               en0   0      192.168.1.1
142.250.203.138/32               en0   0      192.168.1.1
142.250.203.142/32               en0   0      192.168.1.1
142.250.203.150/32               en0   0      192.168.1.1
142.250.203.193/32               en0   0      192.168.1.1
142.250.203.194/32               en0   0      192.168.1.1
142.250.203.195/32               en0   0      192.168.1.1
142.250.203.196/32               en0   0      192.168.1.1
142.250.203.197/32               en0   0      192.168.1.1
142.250.203.202/32               en0   0      192.168.1.1
142.250.203.206/32               en0   0      192.168.1.1
146.59.69.202/32                 en0   0      192.168.1.1
146.75.121.140/32                en0   0      192.168.1.1
146.75.122.202/32                en0   0      192.168.1.1
146.75.122.248/32                en0   0      192.168.1.1
146.75.122.250/32                en0   0      192.168.1.1
147.135.77.141/32                en0   0      192.168.1.1
151.101.1.67/32                  en0   0      192.168.1.1
151.101.3.5/32                   en0   0      192.168.1.1
151.101.37.140/32                en0   0      192.168.1.1
151.101.39.5/32                  en0   0      192.168.1.1
151.101.39.6/32                  en0   0      192.168.1.1
151.101.65.67/32                 en0   0      192.168.1.1
151.101.67.5/32                  en0   0      192.168.1.1
151.101.129.67/32                en0   0      192.168.1.1
151.101.131.5/32                 en0   0      192.168.1.1
151.101.193.67/32                en0   0      192.168.1.1
151.101.195.5/32                 en0   0      192.168.1.1
172.217.16.3/32                  en0   0      192.168.1.1
172.217.16.10/32                 en0   0      192.168.1.1
172.217.16.14/32                 en0   0      192.168.1.1
172.217.16.22/32                 en0   0      192.168.1.1
172.217.16.37/32                 en0   0      192.168.1.1
172.217.16.40/32                 en0   0      192.168.1.1
172.217.16.42/32                 en0   0      192.168.1.1
172.217.16.46/32                 en0   0      192.168.1.1
172.217.16.49/32                 en0   0      192.168.1.1
172.217.16.54/32                 en0   0      192.168.1.1
172.217.130.202/32               en0   0      192.168.1.1
172.217.218.84/32                en0   0      192.168.1.1
172.224.204.3/32                 en0   0      192.168.1.1
172.224.204.8/32                 en0   0      192.168.1.1
172.224.204.136/32               en0   0      192.168.1.1
172.232.44.76/32                 en0   0      192.168.1.1
173.194.221.188/32               en0   0      192.168.1.1
176.126.57.204/32                en0   0      192.168.1.1
176.126.57.206/32                en0   0      192.168.1.1
176.126.57.236/32                en0   0      192.168.1.1
185.15.59.224/32                 en0   0      192.168.1.1
185.15.59.240/32                 en0   0      192.168.1.1
185.48.9.140/32                  en0   0      192.168.1.1
185.48.9.141/32                  en0   0      192.168.1.1
185.199.108.153/32               en0   0      192.168.1.1
185.199.108.154/32               en0   0      192.168.1.1
185.199.109.153/32               en0   0      192.168.1.1
185.199.109.154/32               en0   0      192.168.1.1
185.199.110.133/32               en0   0      192.168.1.1
185.199.110.153/32               en0   0      192.168.1.1
185.199.110.154/32               en0   0      192.168.1.1
185.199.111.133/32               en0   0      192.168.1.1
185.199.111.154/32               en0   0      192.168.1.1
185.225.251.25/32                en0   0      192.168.1.1
185.225.251.105/32               en0   0      192.168.1.1
185.225.251.106/32               en0   0      192.168.1.1
188.34.199.114/32                en0   0      192.168.1.1
192.168.1.1/32                   en0   0
192.168.1.42/32                  en0   0
216.58.208.194/32                en0   0      192.168.1.1
216.58.208.195/32                en0   0      192.168.1.1
216.58.208.202/32                en0   0      192.168.1.1
216.58.208.206/32                en0   0      192.168.1.1
216.58.208.214/32                en0   0      192.168.1.1
216.58.209.1/32                  en0   0      192.168.1.1
216.58.209.3/32                  en0   0      192.168.1.1
216.58.209.5/32                  en0   0      192.168.1.1
216.58.209.10/32                 en0   0      192.168.1.1
216.58.209.14/32                 en0   0      192.168.1.1
216.58.215.66/32                 en0   0      192.168.1.1
216.58.215.68/32                 en0   0      192.168.1.1
216.58.215.74/32                 en0   0      192.168.1.1
216.58.215.78/32                 en0   0      192.168.1.1
216.58.215.81/32                 en0   0      192.168.1.1
216.58.215.86/32                 en0   0      192.168.1.1
216.58.215.98/32                 en0   0      192.168.1.1
216.58.215.99/32                 en0   0      192.168.1.1
216.58.215.102/32                en0   0      192.168.1.1
216.58.215.106/32                en0   0      192.168.1.1
216.58.215.110/32                en0   0      192.168.1.1
216.58.215.118/32                en0   0      192.168.1.1
216.239.32.36/32                 en0   0      192.168.1.1
216.239.34.36/32                 en0   0      192.168.1.1
216.239.34.157/32                en0   0      192.168.1.1
216.239.34.178/32                en0   0      192.168.1.1
216.239.36.178/32                en0   0      192.168.1.1
216.239.36.223/32                en0   0      192.168.1.1
216.239.38.223/32                en0   0      192.168.1.1
255.255.255.255/32               en0   0
192.168.1.0/24                   en0   0
169.254.0.0/16                   en0   0
127.0.0.0/8                      lo0   0      127.0.0.1
224.0.0.0/4                      en0   0
0.0.0.0/0                        en0   0      192.168.1.1
::1/128                          lo0   0      ::1
fe80:1::1/128                    lo0   0
fe80:10::65f9:f5cd:3bc4:ba0c/128 lo0   0
fe80:11::4b66:804c:25f9:eae8/128 lo0   0
fe80:14::d976:a78f:da2:e310/128  lo0   0
fe80:15::ce81:b1c:bd2c:69e/128   lo0   0
fd01:8bbd:839:206a::/64          en0   0
fd41:ab5b:6a8:1::/64             en0   0      fe80:e::d965:fb90:bdfe:1299
fe80:1::/64                      lo0   0      fe80:1::1
fe80:e::/64                      en0   0
fe80:10::/64                     utun0 0      fe80:10::65f9:f5cd:3bc4:ba0c
fe80:11::/64                     utun1 0      fe80:11::4b66:804c:25f9:eae8
fe80:12::/64                     awdl0 0
fe80:14::/64                     utun2 0      fe80:14::d976:a78f:da2:e310
fe80:15::/64                     utun3 0      fe80:15::ce81:b1c:bd2c:69e
ff01:1::/32                      lo0   0      ::1
ff01:e::/32                      en0   0
ff01:10::/32                     utun0 0      fe80:10::65f9:f5cd:3bc4:ba0c
ff01:11::/32                     utun1 0      fe80:11::4b66:804c:25f9:eae8
ff01:12::/32                     awdl0 0
ff01:14::/32                     utun2 0      fe80:14::d976:a78f:da2:e310
ff01:15::/32                     utun3 0      fe80:15::ce81:b1c:bd2c:69e
ff02:1::/32                      lo0   0      ::1
ff02:e::/32                      en0   0
ff02:10::/32                     utun0 0      fe80:10::65f9:f5cd:3bc4:ba0c
ff02:11::/32                     utun1 0      fe80:11::4b66:804c:25f9:eae8
ff02:12::/32                     awdl0 0
ff02:14::/32                     utun2 0      fe80:14::d976:a78f:da2:e310
ff02:15::/32                     utun3 0      fe80:15::ce81:b1c:bd2c:69e
ff00::/8                         lo0   0      ::1
ff00::/8                         en0   0
ff00::/8                         utun0 0      fe80:10::65f9:f5cd:3bc4:ba0c
ff00::/8                         utun1 0      fe80:11::4b66:804c:25f9:eae8
ff00::/8                         awdl0 0
ff00::/8                         llw0  0
ff00::/8                         utun2 0      fe80:14::d976:a78f:da2:e310
ff00::/8                         utun3 0      fe80:15::ce81:b1c:bd2c:69e
::/0                             utun0 0      fe80:10::
::/0                             utun1 0      fe80:11::
::/0                             utun2 0      fe80:14::
::/0                             utun3 0      fe80:15::

Additional context
To double-check if it's a problem specific to nmap, I checked out Wireshark, and it can capture en0 successfully. I also tried out versions from Homebrew and an official installer to rule out something specific to the installation script.

Activity

  1. binarynomad commented on Jun 2, 2025

    @binarynomad

    I'm experiencing the exact same issue dnet: Failed to open device en0 on my Macbook:

    • HW: Apple M1 Max / 32 GB / 1 TB
    • OS: 15.5 (24F74)
    • NMAP: version 7.97 (installed via Brew)

    Something of note:

    • nmap 192.16.0.1/24 - works just fine without a problem
    • sudo nmap 192.16.0.1/24 - throws the error dnet: Failed to open device en0
  2. danielgumprecht commented on Jun 3, 2025

    @danielgumprecht

    Same issue.

    OS: macOS Sequoia 15.5 arm64
    Host: MacBook Pro (14-inch, 2024, Three Thunderbolt 5 ports)

    Installed with Homebrew.

  3. praetorfenix404 commented on Jun 3, 2025

    @praetorfenix404

    Same here.

    15.5 M2 Max installed via homebrew

  4. diegorv commented on Jun 3, 2025

    @diegorv

    Same here.

    ❯ brew info nmap
    ==> nmap: stable 7.97 (bottled), HEAD
    Port scanning utility for large networks
    https://nmap.org/
    Conflicts with:
      cern-ndiff (because both install `ndiff` binaries)
      ndiff (because both install `ndiff` binaries)
      nping (because both install `nping` binaries)
    Installed
    /opt/homebrew/Cellar/nmap/7.97 (835 files, 28MB) *
      Poured from bottle using the formulae.brew.sh API on 2025-06-03 at 14:33:53
    From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/n/nmap.rb
    License: LicenseRef-Homebrew-cannot-represent
    ==> Dependencies
    Required: liblinear ✔, libssh2 ✔, lua ✔, openssl@3 ✔, pcre2 ✔
    ==> Options
    --HEAD
    	Install HEAD version
    ==> Caveats
    If using `ndiff` returns an error about not being able to import the ndiff module, try:
      chmod go-w /opt/homebrew/Cellar
    ==> Analytics
    install: 32,575 (30 days), 71,206 (90 days), 242,440 (365 days)
    install-on-request: 32,168 (30 days), 70,384 (90 days), 239,345 (365 days)
    build-error: 76 (30 days)
    
    ❯ sw_vers
    ProductName:		macOS
    ProductVersion:		14.7.5
    BuildVersion:		23H527
    
  5. MorozovVasily commented on Jun 3, 2025

    @MorozovVasily

    Same issue after updating nmap with homebrew
    I installed official version without homebrew: https://nmap.org/dist/nmap-7.97.dmg
    Still same issue.

    nmap-7.96 also have this problem

    I recomend to install nmap-7.95
    It works correctly for me.

  6. dasl- commented on Jun 4, 2025

    @dasl-

    FYI you can download the working version mentioned in #3127 (comment) at this URL: https://nmap.org/dist/nmap-7.95.dmg

  7. added a commit that references this issue on Jun 5, 2025
    7c4e1bf
  8. dmiller-nmap commented on Jun 6, 2025

    @dmiller-nmap

    A workaround until the fix is released ought to be sudo ln -s /dev/bpf0 /dev/bpf

    This does not actually work because devfs does not support symlinks. Instead, try --disable-arp-ping or --send-ip as a workaround.

  9. ckujau commented on Jun 7, 2025

    @ckujau

    A workaround until the fix is released ought to be sudo ln -s /dev/bpf /dev/bpf0

    This doesn't work here (macOS 15.5 24F74, M3 Mac), but yeah, downgrading to 7.95 helps:

    $ sudo ln -s /dev/bpf /dev/bpf0
    ln: /dev/bpf0: Operation not permitted
    
    ### So, bpf0 does already exist here, but bpf is missing. But I couldn't create that anyway:
    $ sudo touch /dev/foo
    touch: /dev/foo: Operation not permitted
    
    $ mount | grep devfs
    devfs on /dev (devfs, local, nobrowse)
    
    $ ls -l /dev/bpf*
    crw-------  1 root  wheel  0x17000000  7 Jun 21:52 /dev/bpf0
    crw-------  1 root  wheel  0x17000001  7 Jun 21:52 /dev/bpf1
    crw-------  1 root  wheel  0x17000002  7 Jun 21:46 /dev/bpf2
    crw-------  1 root  wheel  0x17000003  1 Jun 23:14 /dev/bpf3
    

    PS: I had a little trouble installing just nmap from the link above. It ended up installing the whole Zenmap application but I only wanted the command line tool. So I "installed" it manually:

    $ curl -O https://nmap.org/dist/nmap-7.95.dmg
    $ sha256sum nmap-7.95.dmg | grep -i FC069B88F6B64CBB56B02A644075D78DF603D9417D3947FF32ACC0566439DE3C
    fc069b88f6b64cbb56b02a644075d78df603d9417d3947ff32acc0566439de3c  nmap-7.95.dmg
    
    $ hdiutil mount nmap-7.95.dmg
    $ cd /Volumes/nmap-7.95
    $ mkdir /var/tmp/nmap
    $ xar -C /var/tmp/nmap/ -xf nmap-7.95.mpkg ^nmap.pkg
    $ cd /var/tmp/nmap/nmap.pkg
    $ gzip -dc Payload | cpio -iv
    $ sudo install -m 0755 -o root -g wheel bin/nmap /usr/local/bin/nmap 
    $ /usr/local/bin/nmap --version | head -1
    Nmap version 7.95 ( https://nmap.org )
    
  10. geonicz commented on Jun 13, 2025

    @geonicz

    this worked for me using brew(reverting to 7.95 using official brew repo history):

    git clone git@github.com:Homebrew/homebrew-core.git
    cd homebrew-core/
    git checkout 2673e6f551e56237a9397bae4b0cd1f8e58609d8
    brew install ./Formula/n/nmap.rb
    
    nmap --version
    Nmap version 7.95 ( https://nmap.org )
    Platform: arm-apple-darwin24.2.0
    Compiled with: liblua-5.4.7 openssl-3.5.0 libssh2-1.11.1 libz-1.2.12 libpcre2-10.45 nmap-libpcap-1.10.4 nmap-libdnet-1.12 ipv6
    Compiled without:
    Available nsock engines: kqueue poll select
    

    One can also prevent autoupdate of 7.95 version with

    brew pin nmap
    
  11. wellu commented on Jun 16, 2025

    @wellu

    So where and why brew install nmap@7.95 went?

  12. Nek-12 commented on Jun 25, 2025

    @Nek-12

    Closed 3 weeks ago, removed workarounds, didn't release a new version, removed previous versions, no solution

  13. dmiller-nmap commented on Jun 26, 2025

    @dmiller-nmap

    @Nek-12 We do not manage the Homebrew repository. Earlier versions of Nmap are still available for download from https://nmap.org/dist/ . The issue is closed because a fix has been committed. The best workaround I can suggest at the moment is to use --disable-arp-ping or --send-ip. If neither of those work, then Nmap's unprivileged features (TCP connect scan, NSE scripts, and service/version detection) will still work.

  14. tomholford commented on Jul 14, 2025

    @tomholford

    Building from src HEAD worked for me:

    brew unlink nmap # will remove symlink but keep the installed pre-built binary
    brew install --HEAD nmap
  15. clauber115 commented on Jul 15, 2025

    @clauber115

    Building from src HEAD worked for me:

    brew unlink nmap # will remove symlink but keep the installed pre-built binary
    brew install --HEAD nmap

    That worked for me - will this be something we need to undo (aka pointing it back to brew install nmap instead of HEAD) in the future when a proper fix is baselined?

  16. two-dogs commented on Jul 19, 2025

    @two-dogs

    sudo nmap works fine on macos Tahoe from terminal, zenmap also works fine if started from terminal.

  17. RadouaneElhajali commented on Aug 3, 2025

    @RadouaneElhajali

    So follow as @ckujau did before:

    $ curl -O https://nmap.org/dist/nmap-7.95.dmg
    $ sha256sum nmap-7.95.dmg | grep -i FC069B88F6B64CBB56B02A644075D78DF603D9417D3947FF32ACC0566439DE3C
    fc069b88f6b64cbb56b02a644075d78df603d9417d3947ff32acc0566439de3c  nmap-7.95.dmg
    
    $ hdiutil mount nmap-7.95.dmg
    $ cd /Volumes/nmap-7.95
    $ mkdir /var/tmp/nmap
    $ xar -C /var/tmp/nmap/ -xf nmap-7.95.mpkg ^nmap.pkg
    $ cd /var/tmp/nmap/nmap.pkg
    $ gzip -dc Payload | cpio -iv
    $ sudo install -m 0755 -o root -g wheel bin/nmap /usr/local/bin/nmap 
    $ /usr/local/bin/nmap --version | head -1
    Nmap version 7.95 ( https://nmap.org )
    

    And then to avoid the following error:

    OS scan requested but I cannot find nmap-os-db file.
    QUITTING!
    

    You should add these two commands:

    # Go back to the mounted volume and install the complete package
    cd /Volumes/nmap-7.95
    sudo installer -pkg nmap-7.95.mpkg -target /
    

    And that's it nmap should be working great on your Mac. Here is all commands again:

    curl -O https://nmap.org/dist/nmap-7.95.dmg
    sha256sum nmap-7.95.dmg | grep -i FC069B88F6B64CBB56B02A644075D78DF603D9417D3947FF32ACC0566439DE3C
    fc069b88f6b64cbb56b02a644075d78df603d9417d3947ff32acc0566439de3c  nmap-7.95.dmg
    hdiutil mount nmap-7.95.dmg
    cd /Volumes/nmap-7.95
    mkdir /var/tmp/nmap
    xar -C /var/tmp/nmap/ -xf nmap-7.95.mpkg ^nmap.pkg
    cd /var/tmp/nmap/nmap.pkg
    gzip -dc Payload | cpio -iv
    sudo install -m 0755 -o root -g wheel bin/nmap /usr/local/bin/nmap 
    cd /Volumes/nmap-7.95
    sudo installer -pkg nmap-7.95.mpkg -target /
    /usr/local/bin/nmap --version | head -1
    Nmap version 7.95 ( https://nmap.org )
    
  18. tomzhu1024 commented on Aug 23, 2025

    @tomzhu1024

    It looks like the issue was solved in version 7.98.

    $ nmap --version
    Nmap version 7.98 ( https://nmap.org )
    Platform: arm-apple-darwin24.4.0
    Compiled with: liblua-5.4.8 openssl-3.5.2 libssh2-1.11.1 libz-1.2.12 libpcre2-10.45 nmap-libpcap-(libpcap version ) nmap-libdnet-1.18.0 ipv6
    Compiled without:
    Available nsock engines: kqueue poll select
    
  19. cjdunteman commented on Aug 28, 2025

    @cjdunteman

    It looks like the issue was solved in version 7.98.

    $ nmap --version
    Nmap version 7.98 ( https://nmap.org )
    Platform: arm-apple-darwin24.4.0
    Compiled with: liblua-5.4.8 openssl-3.5.2 libssh2-1.11.1 libz-1.2.12 libpcre2-10.45 nmap-libpcap-(libpcap version ) nmap-libdnet-1.18.0 ipv6
    Compiled without:
    Available nsock engines: kqueue poll select
    

    Worked for me after updating as well.

  20. binarynomad commented on Aug 28, 2025

    @binarynomad

    I can concur, (Nmap 7.98) is working perfectly for me without the error message.

  21. added a commit that references this issue on Sep 24, 2026
    cb6b956
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions