Update iptables.sh

Bookworm (12) is not accounted for in the iptables script. End up with an almost blank chain on install.
This commit is contained in:
Harry Foster 2024-06-10 13:09:35 +01:00 committed by GitHub
parent 2d1c2bc15d
commit 7b64ed8f8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -22,6 +22,11 @@ if [ ."$os_codename" = ."bullseye" ]; then
update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
fi
if [ ."$os_codename" = ."bookworm" ]; then
apt-get install -y iptables
update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
fi
#remove ufw
ufw reset