CDIST-TYPE__FIREWALLD_RULE(7)
β¨ NAME β¨
cdist-type__firewalld_rule β this is the cdist type that configures firewalld rules, bestie π
π¦ DESCRIPTION π¦
okay so real talk: this cdist type lets you manage rules in firewalld using the direct way β aka no zone support π
that's it, that's the whole vibe. direct rules, no zones, periodt.
π REQUIRED PARAMETERS π
like, these ones are not optional, you literally have to give them all:
ruleβ the actual rule to apply. essentially it's a firewalld command line but withfirewalldchopped off the front πΈprotocolβ eitheripv4,ipv4oreb. Seefirewall-cmd(1). (and yes bestie, that's genuinely what it says, twoipv4s and anebβ i'm not the one who wrote it, i just work here π)tableβ which table to use, likefilterornat. Seefirewall-cmd(1).chainβ which chain to use, likeINPUT_directorFORWARD_direct. Seefirewall-cmd(1).priorityβ the priority to use (0is topmost). Seefirewall-cmd(1).
π OPTIONAL PARAMETERS π
stateβ'present'or'absent', defaults to'present'β¨
π EXAMPLES π
allow access from entrance.place4.ungleich.ch β iconic behavior, honestly:
# Allow access from entrance.place4.ungleich.ch
__firewalld_rule entrance \
--protocol ipv4 \
--table filter \
--chain INPUT_direct \
--priority 0 \
--rule '-s entrance.place4.ungleich.ch -j ACCEPT'
allow forwarding of traffic from br0 π¦:
# Allow forwarding of traffic from br0
__firewalld_rule vm-forward --protocol ipv4 \
--table filter \
--chain FORWARD_direct \
--priority 0 \
--rule '-i br0 -j ACCEPT'
and here's the "make it go away" one β but bestie, read this carefully:
# Ensure old rule is absent - warning, the rule part must stay the same!
__firewalld_rule vm-forward
--protocol ipv4 \
--table filter \
--chain FORWARD_direct \
--priority 0 \
--rule '-i br0 -j ACCEPT' \
--state absent
β οΈ warning β the rule part must stay the same! if you change the--rulewhile asking for--state absent, it will not be the same rule, and it will not get removed. don't do that to yourself π
π«Ά SEE ALSO π«Ά
cdist-type__iptables_rule(7), firewalld(8)
πΈ AUTHORS πΈ
Nico Schottelius <nico-cdist--@--schottelius.org> β the legend π
π COPYING π
Copyright (C) 2015 Nico Schottelius. 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.
π COPYRIGHT π
ungleich GmbH 2021
and that's the whole page, bestie π§ no cap. this was version 7.0.0, dated Jul 31, 2022, served fresh from the cdist manual β go forth and manage your rules, you absolute main character π
β¨π
π¦ 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