# Set socket: failed to open ICMPV4 socket: operation not permitted

**URL:** <https://forum.greenbone.net/t/set-socket-failed-to-open-icmpv4-socket-operation-not-permitted/13702>\
**Category:** Building from Source and Advanced Topics\
**Created:** [December 17, 2022, 9:25am UTC](https://forum.greenbone.net/t/set-socket-failed-to-open-icmpv4-socket-operation-not-permitted/13702 "2022-12-17T09:25:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![admie](https://forum.greenbone.net/letter_avatar/admie/32/6_449c533f586939b6e5f246632a46421f.png) [@admie](https://forum.greenbone.net/u/admie)\
**Post date:** [December 17, 2022, 9:25am UTC](https://forum.greenbone.net/t/set-socket-failed-to-open-icmpv4-socket-operation-not-permitted/13702/1 "2022-12-17T09:25:10Z")

</div>

Hello!  
Rescently i configured GVM using this guide [Building from Source - Greenbone Community Documentation](https://greenbone.github.io/docs/latest/22.4/source-build/index.html)  
Evrething is working fine but scans won’t start: “Interrupted at 0 %”  
Log file says: set socket: failed to open ICMPV4 socket: operation not permitted. boreas could not initialise alive detection. Boreas was not able to open a new socket

I checked visudo:

# User privilege specification

root ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges

%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command

%sudo ALL=(ALL:ALL) ALL

# allow users of the gvm group run openvas

%gvm ALL = NOPASSWD: /usr/local/sbin/openvas

Checked PATH:  
echo “$PATH”  
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

OS is Ubuntu 22.04 LTS

Can someone help me?

---

<div class="post-metadata">

**Author:** ![cfi](https://forum.greenbone.net/letter_avatar/cfi/32/6_449c533f586939b6e5f246632a46421f.png) [@cfi](https://forum.greenbone.net/u/cfi)\
**Post date:** [December 19, 2022, 2:09pm UTC](https://forum.greenbone.net/t/set-socket-failed-to-open-icmpv4-socket-operation-not-permitted/13702/2 "2022-12-19T14:09:01Z")

</div>

Hello and welcome to this community forums.

This reads quite similar to [Interrupted at 0% Libgvm boreas failed to open ICMPV4](https://forum.greenbone.net/t/interrupted-at-0-libgvm-boreas-failed-to-open-icmpv4/9240) with a possible solution provided in:

> [@Interrupted at 0% Libgvm boreas failed to open ICMPV4](https://forum.greenbone.net/t/interrupted-at-0-libgvm-boreas-failed-to-open-icmpv4/9240/5):
>
> Hi! Thanks for your answer. Your are right, i already have the visudo with the user correctly write. gvm ALL = NOPASSWD: /opt/gvm/sbin/openvas But not updated my secure\_path with the correct prefix frowning secure\_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/opt/gvm/sbin" Thanks for your help!!!

In this specific case it should be made sure that a sane default `secure_path` is included via `visudo` / in `/etc/sudoers` and that this hasn’t been deleted previously. On a Debian system the default looks like:

```auto
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

```

---

<div class="post-metadata">

**Author:** ![admie](https://forum.greenbone.net/letter_avatar/admie/32/6_449c533f586939b6e5f246632a46421f.png) [@admie](https://forum.greenbone.net/u/admie)\
**Post date:** [December 19, 2022, 3:39pm UTC](https://forum.greenbone.net/t/set-socket-failed-to-open-icmpv4-socket-operation-not-permitted/13702/3 "2022-12-19T15:39:39Z")

</div>

Thank you for reply. Already checked that topic and recommendations

Tryed different combinations in sudousers and nothing seems to work, current config is in screenshot:

 ![sudousers](https://forum.greenbone.net/uploads/default/original/2X/b/b8ec5e9da14c210d43879f3b6593b021b164de55.png)

GVM files are installed in: /usr/local/sbin

---

<div class="post-metadata">

**Author:** ![cfi](https://forum.greenbone.net/letter_avatar/cfi/32/6_449c533f586939b6e5f246632a46421f.png) [@cfi](https://forum.greenbone.net/u/cfi)\
**Post date:** [December 19, 2022, 3:54pm UTC](https://forum.greenbone.net/t/set-socket-failed-to-open-icmpv4-socket-operation-not-permitted/13702/4 "2022-12-19T15:54:04Z")

</div>

Also make sure that no other files in `/etc/sudoers.d/*` are defining a `secure_path`. IIRC anything additionally configured for `secure_path` within such files are overwriting a previous defined `secure_path`.

---

<div class="post-metadata">

**Author:** ![admie](https://forum.greenbone.net/letter_avatar/admie/32/6_449c533f586939b6e5f246632a46421f.png) [@admie](https://forum.greenbone.net/u/admie)\
**Post date:** [December 19, 2022, 4:07pm UTC](https://forum.greenbone.net/t/set-socket-failed-to-open-icmpv4-socket-operation-not-permitted/13702/5 "2022-12-19T16:07:43Z")

</div>

Yes i’ve checked it already and it’s empty, even commented that string from sudousers

---

<div class="post-metadata">

**Author:** ![cfi](https://forum.greenbone.net/letter_avatar/cfi/32/6_449c533f586939b6e5f246632a46421f.png) [@cfi](https://forum.greenbone.net/u/cfi)\
**Post date:** [December 21, 2022, 3:12pm UTC](https://forum.greenbone.net/t/set-socket-failed-to-open-icmpv4-socket-operation-not-permitted/13702/6 "2022-12-21T15:12:55Z")

</div>

Unfortunately i’m running out of specific ideas so hopefully some one more familiar with this topic will jump in the future.

There is only a more generic suggestion to check for e.g.

- specific hardening on the host around sudo and/or socket handling
- the IPv4 setup (not sure if Boreas is e.g. always expecting an enabled IPv4, …)

---

<div class="post-metadata">

**Author:** ![blackcat79](https://forum.greenbone.net/letter_avatar/blackcat79/32/6_449c533f586939b6e5f246632a46421f.png) [@blackcat79](https://forum.greenbone.net/u/blackcat79)\
**Post date:** [January 13, 2023, 8:40pm UTC](https://forum.greenbone.net/t/set-socket-failed-to-open-icmpv4-socket-operation-not-permitted/13702/7 "2023-01-13T20:40:20Z")

</div>

Did you find any solution?  
I also have it on a fresh install of 22.04 on Debian 11

Yes the securepath is defined, yes gvm ALL is in the visudo file, yes I followed 100% the documentation

==\> /var/log/gvm/openvas.log \<==  
sd main:MESSAGE:2023-01-13 20h36.41 utc:4923: openvas 22.4.1 started  
sd main:MESSAGE:2023-01-13 20h36.41 utc:4923: attack\_network\_init: INIT MQTT: SUCCESS  
sd main:MESSAGE:2023-01-13 20h36.51 utc:4923: Vulnerability scan b65a0b0d-6f2f-415a-a9ca-176ec26ae1db started: Target has 254 hosts: 192.168.1.0/24, with max\_hosts = 20 and max\_checks = 4  
libgvm boreas:WARNING:2023-01-13 20h36.51 utc:4923: set\_socket: failed to open ICMPV4 socket: Operation not permitted  
libgvm boreas:WARNING:2023-01-13 20h36.51 utc:4923: start\_alive\_detection. Boreas could not initialise alive detection. Boreas was not able to open a new socket. Exit Boreas.  
sd main:MESSAGE:2023-01-13 20h36.52 utc:4923: Vulnerability scan b65a0b0d-6f2f-415a-a9ca-176ec26ae1db finished in 11 seconds: 0 alive hosts of 254

---

<div class="post-metadata">

**Author:** ![cfi](https://forum.greenbone.net/letter_avatar/cfi/32/6_449c533f586939b6e5f246632a46421f.png) [@cfi](https://forum.greenbone.net/u/cfi)\
**Post date:** [May 25, 2023, 10:07am UTC](https://forum.greenbone.net/t/set-socket-failed-to-open-icmpv4-socket-operation-not-permitted/13702/8 "2023-05-25T10:07:23Z")

</div>

As the OP is using Ubuntu the following is to track a possible solution here (because there are still multiple topics open about the same message, @moderation team: Maybe we should really close a few?) a community user identified `AppArmor` on Ubuntu as being a problematic component blocking the usage of the ICMPv4 socket operation required by Boreas:

> [@Boreas could not initialise alive detection](https://forum.greenbone.net/t/boreas-could-not-initialise-alive-detection/14655/9):
>
> Learned that there is something in Ubuntu that is stopping it from running. AppArmor. My solution was to start over and I have loaded Debian and this issue was resolved. Thank you all for your guidance.

---

<div class="post-metadata">

**Author:** ![DeeAnn](https://forum.greenbone.net/user_avatar/forum.greenbone.net/deeann/32/2239_2.png) [@DeeAnn](https://forum.greenbone.net/u/DeeAnn)\
**Post date:** [May 25, 2023, 12:55pm UTC](https://forum.greenbone.net/t/set-socket-failed-to-open-icmpv4-socket-operation-not-permitted/13702/9 "2023-05-25T12:55:08Z")

</div>

Closed on May 25, 2023, 12:55pm UTC

(for future discussion, please see)

> [@Boreas could not initialise alive detection](https://forum.greenbone.net/t/boreas-could-not-initialise-alive-detection/14655/9):
>
> Learned that there is something in Ubuntu that is stopping it from running. AppArmor. My solution was to start over and I have loaded Debian and this issue was resolved. Thank you all for your guidance.
