semanage-node(8)
π semanage-node(8) π
okay bestie, listen up β this is the semanage-node page from the semanage family of man pages (section 8, system admin stuff, so you know it's giving root energy). It's the SELinux Policy Management node mapping tool, and I'm gonna walk you through every single flag like we're on a FaceTime call at 2am. no skips, no "you get the idea", we're doing all of it. π«Ά
β¨ NAME β¨
semanage-node β SELinux Policy Management node mapping tool
like, it maps IP addresses to SELinux types. that's the whole vibe. π
πΈ SYNOPSIS πΈ
semanage node [-h] [-n] [-N] [-S STORE] [ --add -M NETMASK -p PROTOCOL
-t TYPE -r RANGE node | --delete -M NETMASK -p PROTOCOL node |
--deleteall | --extract | --list [-C] | --modify -M NETMASK -p PROTOCOL
-t TYPE -r RANGE node ]
yes it's a lot. breathe. we'll get through it together. π§
π¦ DESCRIPTION π¦
semanage is used to configure certain elements of SELinux policy without requiring modification to or recompilation from policy sources. no cap, that's the whole point β you're editing policy pieces on the fly instead of rebuilding the whole thing like it's 2003.
semanage node controls the IP address to node type definitions. so: IP address goes in, SELinux type comes out. iconic behaviour honestly. β
π OPTIONS π
-h,--helpβ Show this help message and exit. the classic. always there for you.-n,--noheadingβ Do not print heading when listing the specified object type. for when you want the raw output and zero small talk.-N,--noreloadβ Do not reload policy after commit. you're telling it to chill and not do the reload dance.-S STORE,--store STOREβ Select an alternate SELinux Policy Store to manage. picking a whole different store, main character move.-C,--locallistβ List local customizations. only the stuff you changed, none of the stock config.-a,--addβ Add a record of the specified object type.-d,--deleteβ Delete a record of the specified object type. bye bestie π-m,--modifyβ Modify a record of the specified object type. glow-up, but for a policy record.-l,--listβ List records of the specified object type.-E,--extractβ Extract customizable commands, for use within a transaction. very "put it in a little box for later" energy.-D,--deleteallβ Remove all local customizations. π₯ nuclear. it's taking everything out.-M NETMASK,--netmask NETMASKβ Network Mask, either in CIDR (/16) or address mask notation (255.255.0.0,ffff::).-t TYPE,--type TYPEβ SELinux type for the object.-r RANGE,--range RANGEβ MLS/MCS Security Range (MLS/MCS Systems only). SELinux Range for SELinux login mapping defaults to the SELinux user record range. SELinux Range for SELinux user defaults tos0. note the caveat bestie: MLS/MCS systems only, so if you're not on one, this ain't your moment.-p PROTO,--proto PROTOβ Protocol for the specified port (tcp|udp) or internet protocol version for the specified node (ipv4|ipv6). context-dependent, iykyk.
π EXAMPLE π
Apply type node_t to ipv4 node 127.0.0.2
# semanage node -a -t node_t -p ipv4 -M 255.255.255.255 127.0.0.2
look at her go. adding a record, type node_t, protocol ipv4, netmask 255.255.255.255, node 127.0.0.2. ate. β¨
π SEE ALSO π
go read those too, they're the extended universe. π
lowkey reminder: every flag, every default, every argument above is exactly what the original page says β I just made it cute. don't come for me if you typo --netmask. π
and that's the whole page bestie π β this one's from the semanage-node(8) manual, dated 20130617, and it lives under the same semanage-node(8) name at the top of the original header. mwah, go forth and map your nodes. ππ¦π
π¦ where this page comes from
- centos-stream 10: policycoreutils-python-utils 3.10-2.el10 Β· GPL-2.0-or-later
- centos-stream 10: policycoreutils-python-utils 3.11-1.el10 Β· GPL-2.0-or-later
- centos-stream 9: policycoreutils-python-utils 3.6-7.el9 Β· GPL-2.0-or-later
- centos-stream 9: policycoreutils-python-utils 3.6-9.el9 Β· GPL-2.0-or-later
- debian trixie: policycoreutils-python-utils 3.8.1-2 Β· GPL-2.0-or-later
- fedora 43: policycoreutils-python-utils 3.9-5.fc43 Β· GPL-2.0-or-later
- fedora 43: policycoreutils-python-utils 3.9-7.fc43 Β· GPL-2.0-or-later
- fedora 44: policycoreutils-python-utils 3.10-1.fc44 Β· GPL-2.0-or-later
- fedora 44: policycoreutils-python-utils 3.11-2.fc44 Β· GPL-2.0-or-later
- nixos 26.05: selinux-python 3.10
- nixpkgs unstable: selinux-python 3.10
- opensuse-leap 16.0: policycoreutils-python-utils 3.8.1-160000.5.1 Β· GPL-2.0-or-later
- ubuntu questing: policycoreutils-python-utils 3.8.1-2
- ubuntu resolute: policycoreutils-python-utils 3.9-2 Β· GPL-2.0-or-later
- ubuntu stonking: policycoreutils-python-utils 3.11-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms