[GH-ISSUE #6993] ping: Name or service not known (/etc/hosts) #3447

Open
opened 2026-05-05 10:00:20 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @netblue30 on GitHub (Dec 19, 2025).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6993

From https://github.com/netblue30/firejail/discussions/6992:

$ systemctl status systemd-networkd
○ systemd-networkd.service - Network Configuration
     Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; disabled; preset: enabled)
     Active: inactive (dead)

$ systemctl status systemd-resolved
○ systemd-resolved.service - Network Name Resolution
     Loaded: loaded (/usr/lib/systemd/system/systemd-resolved.service; disabled; preset: enabled)
     Active: inactive (dead)

$ systemctl status NetworkManager
● NetworkManager.service - Network Manager
     Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; preset: disabled)
     Active: active (running)

$ grep 127.0.0.1 /etc/hosts
127.0.0.1 testing

$ grep hosts /etc/nsswitch.conf 
hosts: mymachines resolve [!UNAVAIL=return] files myhostname dns

$ getent hosts testing
127.0.0.1       testing

$ ping testing
/usr/bin/ping: testing: Name or service not known

$ /bin/ping testing
... works fine ...
Originally created by @netblue30 on GitHub (Dec 19, 2025). Original GitHub issue: https://github.com/netblue30/firejail/issues/6993 From https://github.com/netblue30/firejail/discussions/6992: ````` $ systemctl status systemd-networkd ○ systemd-networkd.service - Network Configuration Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; disabled; preset: enabled) Active: inactive (dead) $ systemctl status systemd-resolved ○ systemd-resolved.service - Network Name Resolution Loaded: loaded (/usr/lib/systemd/system/systemd-resolved.service; disabled; preset: enabled) Active: inactive (dead) $ systemctl status NetworkManager ● NetworkManager.service - Network Manager Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; preset: disabled) Active: active (running) $ grep 127.0.0.1 /etc/hosts 127.0.0.1 testing $ grep hosts /etc/nsswitch.conf hosts: mymachines resolve [!UNAVAIL=return] files myhostname dns $ getent hosts testing 127.0.0.1 testing $ ping testing /usr/bin/ping: testing: Name or service not known $ /bin/ping testing ... works fine ... `````
gitea-mirror added the
networking
label 2026-05-05 10:00:20 -06:00
Author
Owner

@netblue30 commented on GitHub (Dec 19, 2025):

Seems to be working fine on debian stable without systemd-resolvd, systemd-networkd and NetworkManager:

$ systemctl status systemd-resolved
Unit systemd-resolved.service could not be found.

$ systemctl status systemd-networkd
○ systemd-networkd.service - Network Configuration
     Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; disabled>
     Active: inactive (dead)
TriggeredBy: ○ systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)
   FD Store: 0 (limit: 512)

$ systemctl status NetworkManager
Unit NetworkManager.service could not be found.

What distribution are you using? Also, can you run

$ firejail --noprofile testing

Thanks!

<!-- gh-comment-id:3675160584 --> @netblue30 commented on GitHub (Dec 19, 2025): Seems to be working fine on debian stable without systemd-resolvd, systemd-networkd and NetworkManager: ````` $ systemctl status systemd-resolved Unit systemd-resolved.service could not be found. $ systemctl status systemd-networkd ○ systemd-networkd.service - Network Configuration Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; disabled> Active: inactive (dead) TriggeredBy: ○ systemd-networkd.socket Docs: man:systemd-networkd.service(8) man:org.freedesktop.network1(5) FD Store: 0 (limit: 512) $ systemctl status NetworkManager Unit NetworkManager.service could not be found. ````` What distribution are you using? Also, can you run ````` $ firejail --noprofile testing ````` Thanks!
Author
Owner

@gcb commented on GitHub (Dec 23, 2025):

Bug happens on Arch. firejail 0.9.76-3

(tested distro and repo profiles)

 $ firejail --noprofile ping testing
firejail version 0.9.76

Parent pid 25093, child pid 25094
Base filesystem installed in 0.05 ms
Child process initialized in 8.33 ms
Warning: an existing sandbox was detected. /usr/bin/ping will run without any additional sandboxing features
/usr/bin/ping: testing: Name or service not known

Parent is shutting down, bye...
<!-- gh-comment-id:3684919046 --> @gcb commented on GitHub (Dec 23, 2025): Bug happens on Arch. firejail 0.9.76-3 (tested distro and repo profiles) ``` $ firejail --noprofile ping testing firejail version 0.9.76 Parent pid 25093, child pid 25094 Base filesystem installed in 0.05 ms Child process initialized in 8.33 ms Warning: an existing sandbox was detected. /usr/bin/ping will run without any additional sandboxing features /usr/bin/ping: testing: Name or service not known Parent is shutting down, bye... ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#3447
No description provided.