Skip to content

Commit 0357efe

Browse files
authored
Merge pull request #491 from marblepebble/master
Fallback to iptables-legacy if iptables doesn't work
2 parents aa103ce + 20bbf04 commit 0357efe

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ RUN \
2727
apk add --no-cache \
2828
fail2ban \
2929
gnupg \
30+
iptables-legacy \
3031
memcached \
3132
nginx-mod-http-brotli \
3233
nginx-mod-http-dav-ext \

Dockerfile.aarch64

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ RUN \
2727
apk add --no-cache \
2828
fail2ban \
2929
gnupg \
30+
iptables-legacy \
3031
memcached \
3132
nginx-mod-http-brotli \
3233
nginx-mod-http-dav-ext \

readme-vars.yml

+1
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ app_setup_block: |
141141
# changelog
142142
changelogs:
143143
- { date: "24.07.14:", desc: "Rebase to Alpine 3.20. Remove deprecated Google Domains certbot plugin. Existing users should update their nginx confs to avoid http2 deprecation warnings."}
144+
- { date: "01.07.24:", desc: "Fall back to iptables-legacy if iptables doesn't work." }
144145
- { date: "23.03.24:", desc: "Fix perms on the generated `priv-fullchain-bundle.pem`." }
145146
- { date: "14.03.24:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) authelia-location.conf, authelia-server.conf - Update Authelia conf samples with support for 4.38." }
146147
- { date: "11.03.24:", desc: "Restore support for DynuDNS using `certbot-dns-dynudns`." }

root/etc/s6-overlay/s6-rc.d/init-fail2ban-config/run

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
#!/usr/bin/with-contenv bash
22
# shellcheck shell=bash
33

4+
if ! iptables -L &> /dev/null; then
5+
ln -sf /sbin/xtables-legacy-multi /sbin/iptables
6+
ln -sf /sbin/xtables-legacy-multi /sbin/iptables-save
7+
ln -sf /sbin/xtables-legacy-multi /sbin/iptables-restore
8+
ln -sf /sbin/xtables-legacy-multi /sbin/ip6tables
9+
ln -sf /sbin/xtables-legacy-multi /sbin/ip6tables-save
10+
ln -sf /sbin/xtables-legacy-multi /sbin/ip6tables-restore
11+
fi
12+
413
# copy/update the fail2ban config defaults to/in /config
514
cp -R /defaults/fail2ban/filter.d /config/fail2ban/
615
cp -R /defaults/fail2ban/action.d /config/fail2ban/

0 commit comments

Comments
 (0)