fff-firewall: add user-customizable nftables hook #317

Closed
fbl wants to merge 2 commits from fbl/firmware:user-firewall into master
3 changed files with 3 additions and 2 deletions

View File

@ -0,0 +1 @@
nft -f /etc/nftables-fff.conf

View File

@ -4,8 +4,6 @@
START=96
boot() {
LOCALCONFIGSCRIPT="/etc/rc.local.fff_userconfig"
#add LOCALCONFIGSCRIPT to sysupgrade regardless if it already exists or not to prevent data loss
grep -q ^"${LOCALCONFIGSCRIPT}"$ /etc/sysupgrade.conf || echo "$LOCALCONFIGSCRIPT" >> /etc/sysupgrade.conf
# process user commands
[ -f "${LOCALCONFIGSCRIPT}" ] && {

View File

@ -12,6 +12,8 @@ cat > /etc/sysupgrade.conf <<-__EOF__
/etc/config/fff
/etc/config/gateway
/etc/hoodfile
/etc/nftables-fff.conf
/etc/rc.local.fff_userconfig
__EOF__
exit 0