dnsmasq_selinux(8)
π dnsmasq_selinux(8) β the SELinux policy for dnsmasq, explained by your fav unix bestie
okay so this is the manual page for dnsmasq_selinux from the SELinux Policy dnsmasq section β yes the manual name is literally baked in there, we love a self-referential moment β¨
π NAME
dnsmasq_selinux β Security Enhanced Linux Policy for the dnsmasq processes. that's it, that's the whole name section, slay.
πΈ DESCRIPTION
Security-Enhanced Linux secures the dnsmasq processes via flexible mandatory access control. fr fr, SELinux is the bouncer at the club and it checks everyone's ID π
The dnsmasq processes execute with the dnsmasq_t SELinux type. You can check if you have these processes running by executing the ps command with the -Z qualifier.
For example:
ps -eZ | grep dnsmasq_t
like, run that and you'll see if your dnsmasq is living its best dnsmasq_t life π¦
β¨ ENTRYPOINTS
The dnsmasq_t SELinux type can be entered via the dnsmasq_exec_t file type.
The default entrypoint paths for the dnsmasq_t domain are the following:
/usr/bin/dnsmasq
that's the one door in, bestie πͺ
π PROCESS TYPES
SELinux defines process types (domains) for each process running on the system.
You can see the context of a process using the -Z option to ps.
Policy governs the access confined processes have to files. SELinux dnsmasq policy is very flexible, allowing users to set up their dnsmasq processes in as secure a method as possible.
The following process types are defined for dnsmasq:
dnsmasq_t
Note:semanage permissive -a dnsmasq_tcan be used to make the process typednsmasq_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so it's like, "i won't stop you but i'm still gonna talk about it" π
π§ BOOLEANS
SELinux policy is customizable based on least access required. dnsmasq policy is extremely flexible and has several booleans that allow you to manipulate the policy and run dnsmasq with the tightest access possible. the way that least-privilege life is just chef's kiss π
- If you want to allow the dnsmasq to creating and using
netlink_sockets, you must turn on thednsmasq_use_ipsetboolean. Disabled by default.
setsebool -P dnsmasq_use_ipset 1
- If you want to don't-audit all daemons scheduling requests (
setsched,sys_nice), you must turn on thedaemons_dontaudit_schedulingboolean. Enabled by default.
setsebool -P daemons_dontaudit_scheduling 1
- If you want to allow all domains to execute in
fips_mode, you must turn on thefips_modeboolean. Enabled by default.
setsebool -P fips_mode 1
- If you want to allow system to run with NIS, you must turn on the
nis_enabledboolean. Disabled by default.
setsebool -P nis_enabled 1
π MANAGED FILES
The SELinux process type dnsmasq_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note the processes UID still need to have DAC permissions β SELinux isn't out here doing DAC's homework, no cap π₯
NetworkManager_var_lib_t
/var/lib/wicd(/.*)?
/var/lib/NetworkManager(/.*)?
/etc/dhcp/wired-settings.conf
/etc/wicd/wired-settings.conf
/etc/dhcp/manager-settings.conf
/etc/wicd/manager-settings.conf
/etc/dhcp/wireless-settings.conf
/etc/wicd/wireless-settings.conf
NetworkManager_var_run_t
/run/teamd(/.*)?
/run/nm-xl2tpd.conf.*
/run/nm-dhclient.*
/run/NetworkManager(/.*)?
/run/wpa_supplicant(/.*)?
/run/wicd.pid
/run/NetworkManager.pid
/run/nm-dns-dnsmasq.conf
/run/wpa_supplicant-global
cluster_conf_t
/etc/cluster(/.*)?
cluster_var_lib_t
/var/lib/pcsd(/.*)?
/var/lib/cluster(/.*)?
/var/lib/openais(/.*)?
/var/lib/pengine(/.*)?
/var/lib/corosync(/.*)?
/usr/lib/heartbeat(/.*)?
/var/lib/heartbeat(/.*)?
/var/lib/pacemaker(/.*)?
cluster_var_run_t
/run/crm(/.*)?
/run/cman_.*
/run/rsctmp(/.*)?
/run/aisexec.*
/run/heartbeat(/.*)?
/run/pcsd-ruby.socket
/run/corosync-qnetd(/.*)?
/run/corosync-qdevice(/.*)?
/run/pcsd.socket
/run/corosync.pid
/run/cpglockd.pid
/run/rgmanager.pid
/run/cluster/rgmanager.sk
crond_var_run_t
/run/.*cron.*
/run/crond?.pid
/run/crond?.reboot
/run/atd.pid
/run/fcron.pid
/run/fcron.fifo
/run/anacron.pid
dnsmasq_lease_t
/var/lib/dnsmasq(/.*)?
/var/lib/misc/dnsmasq.leases
dnsmasq_tmp_t
(this one's got no paths listed in the original, it's just vibes π«Ά)
dnsmasq_var_run_t
/run/dnsmasq.*
/run/libvirt/network(/.*)?
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
mnt_t
/mnt(/[^/]*)?
/mnt(/[^/]*)?
/rhev(/[^/]*)?
/rhev/[^/]*/.*
/media(/[^/]*)?
/media(/[^/]*)?
/run/media(/[^/]*)?
/media/.hal-.*
/afs
/net
/misc
/rhev
(and yes, /mnt(/[^/]*)? and /media(/[^/]*)? are each listed twice in the original. not a typo on my end, bestie, i'm just being faithful π)
neutron_var_lib_t
/var/lib/neutron(/.*)?
/var/lib/quantum(/.*)?
root_t
/sysroot/.aleph-version.json
/sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
/
/initrd
/var/lib/ntp
π¦ FILE CONTEXTS
SELinux requires files to have an extended attribute to define the file type.
You can see the context of a file using the -Z option to ls.
Policy governs the access confined processes have to these files. SELinux dnsmasq policy is very flexible, allowing users to set up their dnsmasq processes in as secure a method as possible.
β STANDARD FILE CONTEXT
SELinux defines the file context types for the dnsmasq. If you wanted to store files with these types in a different path, you need to execute the semanage command to specify alternate labeling and then use restorecon to put the labels on disk.
semanage fcontext -a -t dnsmasq_exec_t '/srv/dnsmasq/content(/.*)?'
restorecon -R -v /srv/mydnsmasq_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 dnsmasq:
dnsmasq_etc_t
- Set files with the
dnsmasq_etc_ttype, if you want to store dnsmasq files in the/etcdirectories.
Paths:
/etc/dnsmasq.d(/.*)?, /etc/dnsmasq.conf
dnsmasq_exec_t
- Set files with the
dnsmasq_exec_ttype, if you want to transition an executable to thednsmasq_tdomain.
dnsmasq_initrc_exec_t
- Set files with the
dnsmasq_initrc_exec_ttype, if you want to transition an executable to thednsmasq_initrc_tdomain.
dnsmasq_lease_t
- Set files with the
dnsmasq_lease_ttype, if you want to treat the files as dnsmasq lease data.
Paths:
/var/lib/dnsmasq(/.*)?, /var/lib/misc/dnsmasq.leases
dnsmasq_tmp_t
- Set files with the
dnsmasq_tmp_ttype, if you want to store dnsmasq temporary files in the/tmpdirectories.
dnsmasq_unit_file_t
- Set files with the
dnsmasq_unit_file_ttype, if you want to treat the files as dnsmasq unit content.
dnsmasq_var_log_t
- Set files with the
dnsmasq_var_log_ttype, if you want to treat the data as dnsmasq var log data, usually stored under the/var/logdirectory.
dnsmasq_var_run_t
- Set files with the
dnsmasq_var_run_ttype, if you want to store the dnsmasq files under the/runor/var/rundirectory.
Paths:
/run/dnsmasq.*, /run/libvirt/network(/.*)?
Note: File context can be temporarily modified with thechconcommand. If you want to permanently change the file context you need to use thesemanage fcontextcommand. This will modify the SELinux labeling database. You will need to userestoreconto apply the labels.chconis giving temporary tattoo energy,semanage fcontextis the real ink π
π«Ά COMMANDS
semanage fcontextcan also be used to manipulate default file context mappings.semanage permissivecan also be used to manipulate whether or not a process type is permissive.semanage modulecan also be used to enable/disable/install/remove policy modules.semanage booleancan also be used to manipulate the booleans.system-config-selinuxis a GUI tool available to customize SELinux policy settings.
π AUTHOR
This manual page was auto-generated using sepolicy manpage. (a bot wrote this and honestly? it ate π₯)
π SEE ALSO
selinux(8), dnsmasq(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)
okay that's the whole page bestie, go forth and label things correctly π¦β¨
dnsmasq Β· 26-10-06 Β· dnsmasq_selinux(8) β that's the source, version and date sign-off, mwah π periodt.
π¦ where this page comes from
- opensuse-leap 16.0: selinux-policy-doc 20250627+git412.dbf877ab7-160000.1.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms