semanage-node(8)

πŸ“¦
version 3.11 Β· 2 versions
, in centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 to s0. 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. πŸŽ€πŸ¦‹πŸ’–