10

After fresh installs of Ubuntu 18.04 and nmap (snap install) on two separate machines, both return the same nmap error:

dnet: Failed to open device [device-name] QUITTING!

when I run the command:

sudo nmap -sn 192.168.1.0/24

Is there a new syntax I should be using?

The command works without sudo, but outputs less information.

Nmap version is 7.25SVN

Les
  • 121
  • 1
    Do you have the same problem with a non-snap version of nmap? (Snaps are restricted in what they can do, and the snap package might not have the correct permissions.) – JanC May 03 '18 at 20:16

2 Answers2

14

As the comment by WinEunuuchs2Unix suggested the way to make the snap version of nmap work (on Ubuntu 20.04 "focal fossa") is

sudo snap connect nmap:network-control
flowtron
  • 383
  • 3
  • 9
4

As JanC already hinted at, the snap version of nmap has an issue with opening network devices when it is run as root. After removing the snap version and installing the aptitude version it worked as expected.

  • 8
    For the snap version it says after installation you need to run: sudo snap connect nmap:network-control https://snapcraft.io/nmap – WinEunuuchs2Unix Jul 12 '19 at 11:24