diff options
author | Baptiste Jonglez <git@bitsofnetworks.org> | 2022-10-19 16:49:03 +0200 |
---|---|---|
committer | Baptiste Jonglez <git@bitsofnetworks.org> | 2022-11-01 23:25:39 +0100 |
commit | ef597b026bb0351ae909ae1fdaed12e76ddd41b7 (patch) | |
tree | 30654d9138bbd241cd06a1ae460e7fd8f4454606 /package/network/config | |
parent | 5b7c99bc4c4d437285605d2a7dbb17d65aa6453d (diff) | |
download | upstream-ef597b026bb0351ae909ae1fdaed12e76ddd41b7.tar.gz upstream-ef597b026bb0351ae909ae1fdaed12e76ddd41b7.tar.bz2 upstream-ef597b026bb0351ae909ae1fdaed12e76ddd41b7.zip |
firewall: config: drop input traffic by default
This is necessary with firewall4 to avoid a hard-to-diagnose race
condition during boot, causing DNAT rules not to be taken into account
correctly.
The root cause is that, during boot, the ruleset is mostly empty, and
interface-related rules (including DNAT rules) are added incrementally.
If a packet hits the input chain before the DNAT rules are setup, it can
create buggy conntrack entries that will persist indefinitely.
This new default should be safe because firewall4 explicitly accepts
authorized traffic and rejects the rest. Thus, in normal operations, the
default policy is not used.
Fixes: #10749
Ref: https://github.com/openwrt/openwrt/issues/10749
Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
Diffstat (limited to 'package/network/config')
-rw-r--r-- | package/network/config/firewall/files/firewall.config | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/package/network/config/firewall/files/firewall.config b/package/network/config/firewall/files/firewall.config index 61cfe665e4..b90ac7af0a 100644 --- a/package/network/config/firewall/files/firewall.config +++ b/package/network/config/firewall/files/firewall.config @@ -1,6 +1,6 @@ config defaults option syn_flood 1 - option input ACCEPT + option input REJECT option output ACCEPT option forward REJECT # Uncomment this line to disable ipv6 rules |