netutils_selinux(8)

πŸ“¦
version 20250627+git412.dbf877ab7 Β· 7 versions
, in opensuse-leap 16.0

πŸ’… netutils_selinux β€” the SELinux policy page for netutils, but make it make sense

okay so bestie, you've stumbled onto the netutils_selinux manual page (that's the title, and yes the manual is netutils_selinux(8) β€” section 8, sysadmin-coded ✨). Sit down, grab a strawberry drink πŸ“, and let's get into it.


✨ NAME ✨

netutils_selinux β€” the Security Enhanced Linux policy for the netutils processes 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

Security-Enhanced Linux secures the netutils processes via flexible mandatory access control. That's the whole vibe β€” SELinux is the bodyguard, netutils is the celeb, and the policy is the guest list πŸ’…

The netutils processes execute with the netutils_t SELinux type. Want to check if you've got these processes running? Run the ps command with the -Z qualifier. Like this, bestie:

ps -eZ | grep netutils_t

No cap, that's the whole check. -Z is the "show me the SELinux context" flag and it ate πŸ”₯


πŸšͺ ENTRYPOINTS πŸšͺ

The netutils_t SELinux type can be entered via the netutils_exec_t file type. That's the door. The main character energy entrance, if you will πŸ‘‘

The default entrypoint paths for the netutils_t domain are:

/usr/bin/arping, /usr/bin/tcpdump

πŸ‘― PROCESS TYPES πŸ‘―

SELinux defines process types (aka domains) for each process running on the system. Every process gets a label, it's giving personalized name tags at a party πŸŽ€

You can see the context of a process using the -Z option to ps.

Policy governs the access confined processes have to files. The SELinux netutils policy is very flexible, allowing users to set up their netutils processes in as secure a method as possible. Lowkey iconic.

The following process types are defined for netutils:

  • netutils_t
Note: semanage permissive -a netutils_t can be used to make the process type netutils_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. So like… it's lenient but it's still watching you πŸ‘€

🎚️ BOOLEANS 🎚️

SELinux policy is customizable based on least access required. The netutils policy is extremely flexible and has several booleans that allow you to manipulate the policy and run netutils with the tightest access possible. Toggle time, bestie πŸ”˜βœ¨

  • If you want to deny all system processes and Linux users the ability to use bluetooth wireless technology, you must turn on the deny_bluetooth boolean. Disabled by default.
setsebool -P deny_bluetooth 1
  • If you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. Enabled by default.
setsebool -P fips_mode 1
  • If you want to allow the system to run with NIS, you must turn on the nis_enabled boolean. Disabled by default.
setsebool -P nis_enabled 1

That -P is the "make it permanent" flag btw β€” without it your boolean resets on reboot and we do NOT want that πŸ™ˆ


πŸ—‚οΈ MANAGED FILES πŸ—‚οΈ

The SELinux process type netutils_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note: the process's UID still needs to have DAC permissions β€” SELinux is powerful but it's not doing DAC's homework for it πŸ’€

krb5_host_rcache_t

/var/tmp/krb5_0.rcache2
/var/cache/krb5rcache(/.*)?
/var/tmp/nfs_0
/var/tmp/DNS_25
/var/tmp/host_0
/var/tmp/imap_0
/var/tmp/HTTP_23
/var/tmp/HTTP_48
/var/tmp/ldap_55
/var/tmp/ldap_487
/var/tmp/ldapmap1_0

netutils_tmp_t

(this one's listed with no paths attached, so don't come for me β€” I'm reporting exactly what the page says 🫑)


πŸ“ FILE CONTEXTS πŸ“

SELinux requires files to have an extended attribute to define the file type. Everything's labeled, it's very "name tag at the function" energy 🏷️

You can see the context of a file using the -Z option to ls.

Policy governs the access confined processes have to these files. The SELinux netutils policy is very flexible, allowing users to set up their netutils processes in as secure a method as possible.

⭐ STANDARD FILE CONTEXT ⭐

SELinux defines the file context types for netutils. If you wanted to store files with these types in different paths, you need to execute the semanage command to specify alternate labeling, and then use restorecon to put the labels on disk. Two-step process, but she slays:

semanage fcontext -a -t netutils_exec_t '/srv/netutils/content(/.*)?'
restorecon -R -v /srv/mynetutils_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. Regex girlies stay winning 🌈

The following file types are defined for netutils:

  • netutils_exec_t β€” set files with the netutils_exec_t type if you want to transition an executable to the netutils_t domain.

Paths:

/usr/bin/arping, /usr/bin/tcpdump
  • netutils_tmp_t β€” set files with the netutils_tmp_t type if you want to store netutils temporary files in the /tmp directories.
Note: File context can be temporarily modified with the chcon command. If you want to permanently change the file context, you need to use the semanage fcontext command. This will modify the SELinux labeling database. You will need to use restorecon to apply the labels. chcon is the temporary tattoo, semanage fcontext + restorecon is the real ink, iykyk πŸ’…

πŸ› οΈ COMMANDS πŸ› οΈ

  • semanage fcontext can also be used to manipulate default file context mappings.
  • semanage permissive can also be used to manipulate whether or not a process type is permissive.
  • semanage module can also be used to enable/disable/install/remove policy modules.
  • semanage boolean can also be used to manipulate the booleans.
  • system-config-selinux is a GUI tool available to customize SELinux policy settings. Mouse girlies, this one's for you πŸ–±οΈβœ¨

πŸ‘‘ AUTHOR πŸ‘‘

This manual page was auto-generated using sepolicy manpage. The robots wrote this one, not me β€” I just gave it the glow-up πŸ’–


πŸ”— SEE ALSO πŸ”—

selinux(8), netutils(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)

Go read those if you're obsessed with context (and you should be, honestly) πŸ“š


and that's the whole page, bestie 🫢 this version came from the netutils package, dated 26-10-06, and the manual entry is netutils_selinux(8) in section 8 β€” periodt πŸ’…βœ¨

πŸ“¦ where this page comes from