Add save iptables rules commands to harbianaudit.sh

This commit is contained in:
Samson-W 2020-04-13 17:02:57 +08:00
parent ffe2df12fe
commit 5ae5c84416
1 changed files with 3 additions and 0 deletions

View File

@ -18,3 +18,6 @@ sed -i 's/^status=.*/status=enabled/' /opt/harbianaudit/etc/conf.d/8.4.2_aide_cr
NETINTERFACE=$(ip link | grep -v "link/.*" | grep -v -w "lo" | awk -F: '{print $2}' | tr "\n" " ")
/opt/harbianaudit/bin/etc.iptables.rules.v4.sh $NETINTERFACE
/opt/harbianaudit/bin/etc.iptables.rules.v6.sh $NETINTERFACE
/sbin/iptables-save -f /etc/iptables/rules.v4
/sbin/ip6tables-save -f /etc/iptables/rules.v6