rlm_attr_filter(5)

πŸ“¦
version 3.2.10 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, fedora 43, fedora 44, opensuse-leap 16.0

πŸŽ€ rlm_attr_filter β€” FreeRADIUS Module πŸ’…

okay bestie, settle in, because this is the rlm_attr_filter(5) manual page and it's genuinely iconic once you get what it's doing ✨


🌸 NAME 🌸

rlm_attr_filter β€” it's the FreeRADIUS Module, and it's basically the bouncer at the club door of your RADIUS packets 🫢


✨ DESCRIPTION ✨

So the rlm_attr_filter module exists for filtering certain attributes and values in received ( or transmitted ) radius packets. That's the whole vibe. It gives the server a flexible framework to filter the attributes we send to or receive from home servers or NASes. And this makes sense, for example, in an out-sourced dialup situation to various policy decisions, such as restricting a client to certain ranges of Idle-Timeout or Session-Timeout. like, you're not gonna let just anybody set a Session-Timeout of a million seconds, be so fr 😭

Filter rules are normally defined and applied on a per-realm basis, where the realm is anything that is defined and matched based on the configuration of the rlm_realm module. Filter rules can optionally be applied using another attribute, by editing the key configuration for this module. slay, flexible πŸ’…

⚠️ history lesson, bestie, don't skip it: In 2.0.1 and earlier versions, the "accounting" section filtered the Accounting-Request, even though it was documented as filtering the response. This issue has been fixed in version 2.0.2 and later versions. The "preacct" section may now be used to filter Accounting-Request packets. The "accounting" section now filters Accounting-Response packets. Administrators using "attr_filter" in the "accounting" section SHOULD move the reference to "attr_filter" from "accounting" to "preacct". like, actually move it. fr fr. πŸ‘‘

The file that defines the attribute filtering rules follows a similar syntax to the users file. There are a few differences however:

  • There are no check-items allowed other than the name of the key.
  • There can only be a single DEFAULT entry.

The rules for each entry are parsed top to bottom, and an attribute must pass all the rules which affect it in order to make it past the filter. Order of the rules is important. highkey important. The operators and their purpose in defining the rules are as follows:

  • = β€” THIS OPERATOR IS NOT ALLOWED. If used, and warning message is printed and it is treated as ==. so like... don't? πŸ™ˆ
  • := β€” Set, this attribute and value will always be placed in the output A/V Pairs. If the attribute exists, it is overwritten.
  • == β€” Equal, value must match exactly.
  • =* β€” Always Equal, allow all values for the specified attribute.
  • !* β€” Never Equal, disallow all values for the specified attribute. ( This is redundant, as any A/V Pair not explicitly permitted will be dropped ). yes bestie, redundant, we said what we said πŸ’€
  • != β€” Not Equal, value must not match.
  • >= β€” Greater Than or Equal
  • <= β€” Less Than or Equal
  • > β€” Greater Than
  • < β€” Less Than

If regular expressions are enabled the following operators are also possible. ( Regular Expressions are included by default unless your system doesn't support them, which should be rare ). The value field uses standard regular expression syntax.

  • =~ β€” Regular Expression Equal
  • !~ β€” Regular Expression Not Equal

See the default /etc/raddb/mods-config/attr_filter/ for working examples of sample rule ordering and how to use the different operators. literally go look at them, they're right there 🧚

The configuration items are:

  • file β€” This specifies the location of the file used to load the filter rules. This file is used to filter the accounting response, packet before it is proxied, proxy response from the home server, or our response to the NAS.
  • key β€” Usually %{Realm} (the default). Can also be %{User-Name}, or other attribute that exists in the request. Note that the module always keys off of attributes in the request, and NOT in any other packet. read that twice, bestie, it's a whole thing πŸ‘€
  • relaxed β€” If set to 'yes', then attributes which do not match any filter rules explicitly, will also be allowed. This behaviour may be overridden for an individual filter block using the Relax-Filter check item. The default for this configuration item is 'no'.

πŸ¦‹ SECTIONS πŸ¦‹

okay so these are the places you can drop this module, and each one does something different, iykyk:

  • preacct β€” Filters Accounting-Request packets.
  • accounting β€” Filters Accounting-Response packets.
  • pre-proxy β€” Filters Accounting-Request or Access-Request packets prior to proxying them.
  • post-proxy β€” Filters Accounting-Response, Access-Accept, Access-Reject, or Access-Challenge responses from a home server.
  • authorize β€” Filters Access-Request packets.
  • post-auth β€” Filters Access-Accept or Access-Reject packets.

πŸ“ FILES πŸ“

/etc/raddb/radiusd.conf
/etc/raddb/mods-config/attr_filter/*

🌈 SEE ALSO 🌈

radiusd(8), radiusd.conf(5) β€” go read those next, bestie, main character energy πŸ“š


πŸ’œ AUTHOR πŸ’œ

Chris Parker, cparker@segv.org β€” ty king 🫢


and that's the whole page!! ✨ it's giving "raddb royalty" honestly πŸ‘‘ this was rlm_attr_filter(5) from the FreeRADIUS Module, dated 27 June 2013 β€” so yeah, a lil vintage, but she still ate πŸ’…πŸŽ€ no cap, go filter some attributes. periodt. 🌸

πŸ“¦ where this page comes from