mirror of
https://github.com/linuxserver/docker-swag.git
synced 2025-08-03 11:56:17 -04:00
Add iptables-legacy and fall back to it if the normal iptables command doesn't work. Fixes #476
This commit is contained in:
parent
77accb3762
commit
625b11d21c
3 changed files with 11 additions and 0 deletions
|
@ -1,6 +1,15 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if ! iptables -L &> /dev/null; then
|
||||
ln -sf /sbin/xtables-legacy-multi /sbin/iptables
|
||||
ln -sf /sbin/xtables-legacy-multi /sbin/iptables-save
|
||||
ln -sf /sbin/xtables-legacy-multi /sbin/iptables-restore
|
||||
ln -sf /sbin/xtables-legacy-multi /sbin/ip6tables
|
||||
ln -sf /sbin/xtables-legacy-multi /sbin/ip6tables-save
|
||||
ln -sf /sbin/xtables-legacy-multi /sbin/ip6tables-restore
|
||||
fi
|
||||
|
||||
# copy/update the fail2ban config defaults to/in /config
|
||||
cp -R /defaults/fail2ban/filter.d /config/fail2ban/
|
||||
cp -R /defaults/fail2ban/action.d /config/fail2ban/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue