Commit Graph

20 Commits

Author SHA1 Message Date
Adrian Schmutzler 27baecaf37 treewide: set PKG_RELEASE automatically
COMMITCOUNT allows to have the PKG_RELEASE calculated automatically
based on the number of commits for the package folder.

AUTORELEASE will count the number of commits since the last upstream
bump. This is relevant for packages with PKG_VERSION or
PKG_SOURCE_DATE set, but will not work for us since it assumes the
use of certain identifiers in commit titles.

COMMITCOUNT works fine for most of our packages, with the following
exceptions:

 * fff-nodewatcher would yield a commit count of 55, while the
   current PKG_RELEASE is 61. Thus, we do not touch it for now.

 * Packages that have been renamed will start counting from 1 after
   the rename, since folder renames are not tracked by git. This
   will result in descreasing PKG_RELEASE after the change for
   these packages.
   However, since moving essentially creates a new package anyway,
   counting from 1 makes sense conceptually, and PKG_RELEASE is
   still replaced for these packages.

 * alfred-json and fff-macnock use upstream code and thus would
   normally require AUTORELEASE. As discussed above, this will
   not work for us, so just leave these two untouched.

Note that all this is quite irrelevant for the way we use packages
currently, as without opkg PKG_RELEASE does not matter to us anyway.
So, let's just be happy about not having to bump PKG_RELEASE
anymore, while keeping the basic functionality intact.

The only package where the PKG_RELEASE is actually used for
something is fff-nodewatcher, where the version will be displayed
in the Monitoring.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[fabian@blaese.de: rebase, add new packages]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2022-01-09 22:03:09 +01:00
Johannes Kimmel feeead6c43 fff-firewall: remove obsolete rules
20-clamp-mss:

Clamping is done in other parts of the network and to a very low static
value. This rules is very likely doing nothing at the moment.

20-filter-ssh:

These rules make use of the conntrack module to ratelimit incoming
connections. Using conntrack comes with a performance penalty for all
traffic. As an alternative, dropbear could be run behind an inetd(-like)
service that does the ratelimit, should removing this rule result in an
actual attack vector.

Removing both rules would enable us to unload the conntrack module all
together, potentially improving overall performance.

Fixes #183

Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Acked-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-12-30 16:02:02 +01:00
Robert Langhammer f8645e494f fff-firewall: Flush all installed tables.
With this patch all installed tables are flushed.
We no longer have to worry about the modules
installed or not. (nat, mangle ...)

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-11-10 13:42:14 +01:00
Fabian Bläse 09450bc4b5 Unify package URL in fff-packages
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-11-10 13:42:03 +01:00
Robert Langhammer 811fdac32d fff-firewall: Add ipv4 ssh connection limit
With commit [1] the ipv4 firewall on wan interface was removed.
This patch adds the ssh connection limit for ipv4.
IPv6 is already limited.

[1] 52e15e072c ("fff-firewall: Remove ssh firewall on WAN interface")

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
[improve commit reference]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-27 14:48:10 +01:00
Adrian Schmutzler e3954fddf5 packages/fff: drop redundant PKG_BUILD_DIR
PKG_BUILD_DIR has the following default values set in include/package.mk,
in case no BUILD_VARIANT is set:

With PKG_VERSION set: $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
Without PKG_VERSION:  $(BUILD_DIR)/$(PKG_NAME)

Consequently, all PKG_BUILD_DIR definitions in our packages are
redundant. Remove them.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-01-27 20:22:02 +01:00
Fabian Bläse f8b93325f2 fff-firewall: Remove variables not used by procd
The variables SERVICE_WRITE_PID and SERVICE_DAEMONIZE are not used by
procd, so they are removed.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-27 19:36:51 +01:00
Robert Langhammer 3eb744e491 fff-firewall: Restart when network configuration changes
The configuration of our firewall depends on the network configuration.
Most importantly, the firewall has to be restarted, if the WAN-interface
is changed.

Therefore, a procd reload trigger is added to the init-script, so our
firewall is automatically restarted, when the network configuration is
changed.

Fixes: #46 (gitea)

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
[fabian@blaese.de: Remove unrelated changes]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-27 19:31:55 +01:00
Adrian Schmutzler b69469a0b9 packages/fff: remove unneeded Build/Prepare and Build/Configure
Build/Prepare and Build/Configure are not required for packages
which only contain local files and do not need any compilation.

Remove them.

Note that Build/Compile needs to be present and empty to overwrite
the defaults, though.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-12-22 13:47:45 +01:00
Fabian Bläse 52e15e072c fff-firewall: Remove ssh firewall on WAN interface
This firewall was introduced as a countermeasure for very slow routers
directly connected to the internet without any firewall.

Our routers have got quite a bit faster since then. Also, a setup like
this is highly uncommon, especially for slower routers.

Therefore this firewall rule is removed.

Fixes: #138
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
[bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-15 13:05:49 +02:00
Adrian Schmutzler 6f132f858e firewall.d: Check for unset IF_WAN
In some cases (mostly for one-port devices) IF_WAN was used
although not set, resulting in not obviously iptables error
messages like

- Bad argument `conntrack'

- Bad argument `REJECT'

Thus, check whether IF_WAN is set to something before using it.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-11-17 15:46:34 +01:00
Fabian Bläse 6724aaedee Move node-specific firewall rules to fff-node
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-11-10 14:27:46 +01:00
Adrian Schmutzler e9268539d1 packages/fff: Only use PKG_RELEASE for our own packages
PKG_VERSION is meant to refer to the version of external packages,
as we do e.g. in the tunneldigger package.

For our own packages, we just need the PKG_RELEASE variable.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
[Rebased onto current state of master]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-07-01 21:54:09 +02:00
Adrian Schmutzler fa2ead9306 packages/fff: Use tabs in Makefiles
Currently, Makefile use a mixture of tabs and spaces with various
indents. This harmonizes all Makefiles to use tab indentation only.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2019-02-05 14:29:31 +01:00
Adrian Schmutzler f6a457fd5e fff-firewall: Fix match in ip6tables and add dependencies
The syntax " -m state --state " seems to be not supported anymore.

The replace should not change behavior compared to
lede-17.01-based firmware.

Added required dependency.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-10-24 18:04:52 +02:00
Tim Niemeyer 9f263c1b38 fff-firewall: clean up v6 rules on prepare
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Christian Dresel <fff@chrisi01.de>
2018-03-03 21:34:36 +01:00
Adrian Schmutzler e7e27c168c Utilize PKG_NAME in Makefiles
Since there is a PKG_NAME variable, there is no need to repeat
the individual package name five times.

This makes editing and particularly copying Makefiles much
easier, as only the PKG_NAME has to be changed.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-10-16 21:20:02 +02:00
Christian Dresel bee682345a Increase SSH Connection Limit
Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-10-30 13:05:04 +01:00
Tobias Klaus ebd863c23e Makes firewall init script executable
Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-05-04 10:04:49 +02:00
Tim Niemeyer b61830c304 fff-firewall: new package
- moves the node<-->client ra rules to package fff-uradvd

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-04-05 23:27:11 +02:00