Skip to content

Commit

Permalink
[Update] Remove problematic iptables-legacy rule
Browse files Browse the repository at this point in the history
  • Loading branch information
andryyy committed Apr 7, 2021
1 parent c4a1e9d commit d71ce15
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,6 @@ while read NAT_ID; do
iptables -t nat -D POSTROUTING $NAT_ID
done < <(iptables -L -vn -t nat --line-numbers | grep $IPV4_NETWORK | grep -E 'MASQUERADE.*all' | grep -v ${MAILCOW_BRIDGE} | cut -d' ' -f1)

echo -e "\e[32mChecking for iptables-legacy...\e[0m"
if update-alternatives --list iptables 2> /dev/null | grep -q /usr/sbin/iptables-legacy; then
update-alternatives --set iptables /usr/sbin/iptables-legacy
fi

DIFF_DIRECTORY=update_diffs
DIFF_FILE=${DIFF_DIRECTORY}/diff_before_update_$(date +"%Y-%m-%d-%H-%M-%S")
mv diff_before_update* ${DIFF_DIRECTORY}/ 2> /dev/null
Expand Down

0 comments on commit d71ce15

Please sign in to comment.