add_rdr_destroy

This commit is contained in:
Bike Dude
2020-03-30 22:33:32 +02:00
parent 67964a7fbb
commit 0f4597a2c6

View File

@@ -80,6 +80,12 @@ destroy_jail() {
echo -e "${COLOR_GREEN}Note: jail console logs archived.${COLOR_RESET}"
echo -e "${COLOR_GREEN}${bastille_jail_log}-$(date +%F)${COLOR_RESET}"
fi
## clear any active rdr rules
if [ ! -z "$(pfctl -a "rdr/${TARGET}" -Psn 2>/dev/null)" ]; then
echo -e "${COLOR_GREEN}Clearing RDR rules:${COLOR_RESET}"
pfctl -a "rdr/${TARGET}" -Fn
fi
echo
fi
}