script to output current firewall ruleset

This commit is contained in:
Matthew Saunders Brown 2023-08-20 11:14:31 -07:00
parent 6160b1d10a
commit fd3bbd0e75

9
sbin/firewall-list-ruleset.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
# firewalld is using nftables
nft list table inet firewalld
# you can also export the current ruleset in json format:
# nft -j list ruleset
# and to parse the json export do:
# nft -j list ruleset | jq .