Skip to content

Commit d9f40d4

Browse files
committed
Update install script to clean iptables rules before start
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
1 parent 0c68372 commit d9f40d4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

install.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -967,6 +967,15 @@ service_enable_and_start() {
967967
return
968968
fi
969969
970+
if command -v iptables-save &> /dev/null && command -v iptables-restore &> /dev/null
971+
then
972+
$SUDO iptables-save | grep -v KUBE- | grep -v CNI- | grep -iv flannel | $SUDO iptables-restore
973+
fi
974+
if command -v ip6tables-save &> /dev/null && command -v ip6tables-restore &> /dev/null
975+
then
976+
$SUDO ip6tables-save | grep -v KUBE- | grep -v CNI- | grep -iv flannel | $SUDO ip6tables-restore
977+
fi
978+
970979
[ "${HAS_SYSTEMD}" = true ] && systemd_start
971980
[ "${HAS_OPENRC}" = true ] && openrc_start
972981
return 0

0 commit comments

Comments
 (0)