CDIST-TYPE__PF_APPLY_ANCHOR(7)
π¦ cdist-type__pf_apply_anchor β¨
okay bestie, so this is cdist-type__pf_apply_anchor from the cdist manual (section 7, obviously π
) and it's literally here to apply a pf(4) anchor on $__target_host. yes. that's the whole gig. she's focused, she's iconic, she's giving main character energy π
πΈ DESCRIPTION πΈ
so here's the tea: this type is what you reach for on *BSD systems when you wanna manage anchors for the pf firewall. that's it, that's the vibe π§
not me forgetting to mention β this type does not take care of copying the ruleset, okay?? that part is on you, and you gotta do it with like, e.g. __file. don't come for me, I'm just the messenger π
π OPTIONAL PARAMETERS π
anchor_nameβ the name of the anchor to apply. if you don't set it,${__object_id}gets used instead (she'll fill in for you, so generous π). also, lowkey important: this type requires/etc/pf.d/${anchor_name}to actually exist on$__target_host. like, it has to be there fr fr, no anchor file no party π
π EXAMPLES π
okay so first you gotta copy the anchor file over to ${__target_host}:
# Copy anchor file to ${__target_host}
__file "/etc/pf.d/80_dns" --source - <<EOF
# Managed remotely, changes will be lost
pass quick proto {tcp,udp} from any to any port domain
EOF
and then you apply the anchor, like the queen you are β¨:
# Apply the anchor
require="__file/etc/pf.d/80_dns" __pf_apply_anchor 80_dns
# This is roughly equivalent to:
# pfctl -a "${anchor_name}" -f "/etc/pf.d/${anchor_name}"
iykyk β that commented line is roughly equivalent to the two commands above, so if you already knew that, slay π
π SEE ALSO π
π AUTHORS π
- Evilham
<contact--@--evilham.com> - Kamila SouΔkovΓ‘
<coding--@--kamila.is> - Jake Guffey
<jake.guffey--@--eprotex.com>
π COPYING π
Copyright (C) 2020 Evilham. Copyright (C) 2016 Kamila SouΔkovΓ‘. Copyright (C) 2012 Jake Guffey.
You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. periodt π«Ά
π COPYRIGHT π
ungleich GmbH 2021
okay bestie that's the whole page, we ate and left no crumbs π₯ this was version 7.0.0 from Jul 31, 2022, brought to you by the cdist girlies β mwah, go apply some anchors πβ¨π
π¦ where this page comes from
- fedora 43: cdist 7.0.0-16.fc43 Β· GPL-3.0-only
- fedora 44: cdist 7.0.0-18.fc44 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms