Compare commits

...

2 Commits

Author SHA1 Message Date
Fabian Bläse 871e80eb35 Consolidate sysupgrade.conf entries
Most of the entries in /etc/sysupgrade.conf are generated by a
uci-defaults script in the fff-sysupgrade package. The only entry
added in a different place is rc.local.fff_userconfig.

Consolidate all entries to be added by the uci-defaults script in
fff-sysupgrade.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-03-11 22:08:55 +01:00
Fabian Bläse 1309eaaf11 fff-firewall: add user-customizable nftables hook
Currently there is no way to persistently configure firewall rules on a
router. This might be desirable as home-use of the Freifunk network is
quite common these days.

To allow for the most flexibility while keeping maintenance efforts low,
add a persistent, user-customizable nftables hook. It is evaluated after
all firewall rules have already been configured, so it is possible to
override them.

Users of this hook are responsible for keeping up with changes to the
firmware and modify it appropriately, before updating the system.

Fixes: #314

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-03-11 22:08:49 +01:00
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