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

1
  • 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 3, 2018 at 20:16

2 Answers 2

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
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.

1
  • 8
    For the snap version it says after installation you need to run: sudo snap connect nmap:network-control snapcraft.io/nmap Jul 12, 2019 at 11:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .