Make RDR rules persistent between bastille restarts.

This commit is contained in:
Tobias Tom
2020-10-19 15:17:46 +01:00
parent 917b4d8d0b
commit 7d78358f9f
2 changed files with 23 additions and 0 deletions
+7
View File
@@ -86,6 +86,13 @@ for _jail in ${JAILS}; do
done < "${bastille_jailsdir}/${_jail}/rctl.conf"
fi
## add rdr rules
if [ -s "${bastille_jailsdir}/${_jail}/rdr.conf" ]; then
while read _rules; do
bastille rdr "${_jail}" ${_rules}
done < "${bastille_jailsdir}/${_jail}/rdr.conf"
fi
## add ip4.addr to firewall table:jails
if [ -n "${bastille_network_loopback}" ]; then
if grep -qw "interface.*=.*${bastille_network_loopback}" "${bastille_jailsdir}/${_jail}/jail.conf"; then