wireguard_selinux(8)
π wireguard_selinux β the manual, but make it make sense π
okay so bestie, this is the wireguard_selinux(8) page β yes, that's the manual name, it's giving very "SELinux Policy wireguard" energy and honestly? iconic. sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
wireguard_selinux β the Security Enhanced Linux Policy for the wireguard processes. that's it. that's the whole name. slay.
π¦ SYNOPSIS π¦
this page is pure documentation, no cap β there's no synopsis line to copy, so just vibe with the sections below.
πΈ DESCRIPTION πΈ
Security-Enhanced Linux secures the wireguard processes via flexible mandatory access control. yes, mandatory. yes, it means it. π
The wireguard processes execute with the wireguard_t SELinux type. wanna check if you've got these processes running? just run the ps command with the -Z qualifier.
for example:
ps -eZ | grep wireguard_t
that's it. that's the vibe check. π₯
π ENTRYPOINTS π
the wireguard_t SELinux type can be entered via the wireguard_exec_t file type.
the default entrypoint paths for the wireguard_t domain are literally these:
/usr/bin/wg-quick
one path. one icon. main character energy fr fr. π
π PROCESS TYPES π
SELinux defines process types (domains) for each process running on the system. like, every process gets its own little domain, it's very "everyone gets a personality". π§
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 wireguard policy is very flexible, allowing users to set up their wireguard processes in as secure a method as possible. flexible and secure? we love a multitasker. β¨
the following process types are defined for wireguard:
wireguard_t
Note:semanage permissive -a wireguard_tcan be used to make the process typewireguard_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like β it stops saying no, but it still keeps receipts. π
π BOOLEANS π
SELinux policy is customizable based on least access required. the wireguard policy is extremely flexible and has several booleans that allow you to manipulate the policy and run wireguard with the tightest access possible. tightest access possible = the goal, the dream, the aesthetic. π
if you want to dontaudit all daemons scheduling requests (setsched, sys_nice), you must turn on the daemons_dontaudit_scheduling boolean. 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 the fips_mode boolean. enabled by default.
setsebool -P fips_mode 1
if you want to disable kernel module loading, you must turn on the secure_mode_insmod boolean. disabled by default.
setsebool -P secure_mode_insmod 1
three booleans, three little switches, and yes yousetsebool -Pall of them. the-Pis the "make it permanent" one, don't forget it bestie. π«Ά
π¦ MANAGED FILES π¦
the SELinux process type wireguard_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 job, okay? π
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
mount_var_run_t
/run/mount(/.*)?
/dev/.mount(/.*)?
/run/davfs2(/.*)?
/var/cache/davfs2(/.*)?
net_conf_t
/etc/hosts[^/]*
/etc/yp.conf.*
/etc/denyhosts.*
/run/netconfig(/.*)?
/etc/hosts.deny.*
/run/cloud-init(/.*)?
/etc/resolv.conf.*
/etc/.resolv.conf.*
/etc/resolv-secure.conf.*
/run/systemd/network(/.*)?
/etc/sysconfig/network(/.*)?
/etc/sysconfig/network/.*resolv.conf
/etc/sysconfig/networking(/.*)?
/run/NetworkManager/resolv.conf.*
/run/NetworkManager/no-stub-resolv.conf.*
/etc/sysconfig/network/scripts/functions.netconfig
/etc/ethers
/etc/ntp.conf
/run/systemd/resolve/resolv.conf
/run/systemd/resolve/stub-resolv.conf
root_t
/sysroot/.aleph-version.json
/sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
/
/initrd
/var/lib/ntp
tmpfs_t
/dev/shm
/run/shm
/usr/lib/udev/devices/shm
like, look at all those paths. that's a whole mood board. πΈ
π FILE CONTEXTS π
SELinux requires files to have an extended attribute to define the file type. yes, an extended attribute. it's very "your file has a secret little label". π
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 wireguard policy is very flexible, allowing users to set up their wireguard processes in as secure a method as possible.
β STANDARD FILE CONTEXT β
SELinux defines the file context types for the wireguard. if you wanted to store files with these types in a different paths, 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 wireguard_exec_t '/srv/wireguard/content(/.*)?'
restorecon -R -v /srv/mywireguard_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies rise. π
the following file types are defined for wireguard:
wireguard_exec_t
- set files with the
wireguard_exec_ttype, if you want to transition an executable to thewireguard_tdomain.
wireguard_unit_file_t
- set files with the
wireguard_unit_file_ttype, if you want to treat the files aswireguardunit content.
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. temporary vs permanent, choose wisely bestie. π
π 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. a GUI!! for when the terminal is doing too much. π«Ά
π AUTHOR π
this manual page was auto-generated using sepolicy manpage.
π SEE ALSO π
selinux(8), wireguard(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)
and that's the whole page!! this was wireguard, dated 26-10-06, filed under wireguard_selinux(8) β go forth and label responsibly, bestie π
β¨π
π¦ 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