Miskatonic University Press

Making nmap work after installing with snap

unix

Noting for myself how to fix it when nmap complains it can’t open the network interface. This is yet another Ubuntu snap annoyance, but at least one command makes it go away.

$ sudo nmap -sS 192.168.0.*
Starting Nmap 7.94 ( https://nmap.org ) at 2023-11-21 21:53 EST
dnet: Failed to open device wlp0s20f1
QUITTING!
$ sudo snap connect nmap:network-control
Connect nmap:network-control to snapd:network-control
$ sudo nmap -sS 192.168.0.*
Starting Nmap 7.94 ( https://nmap.org ) at 2023-11-21 21:53 EST
Nmap scan report for _gateway (192.168.0.1)
Host is up (0.0032s latency).
Not shown: 996 closed tcp ports (reset)
PORT     STATE SERVICE
53/tcp   open  domain
80/tcp   open  http
443/tcp  open  https
1900/tcp open  upnp
...