mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
firewall: Add proper logging prefix for conntrack INVALID hits
Fixes: #12778 Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
This commit is contained in:
@@ -121,9 +121,13 @@ iptables_init() {
|
||||
iptables -A FORWARD -p tcp -j BADTCP
|
||||
|
||||
# Connection tracking chains
|
||||
iptables -N CTINVALID
|
||||
iptables -A CTINVALID -m limit --limit 10/second -j LOG --log-prefix "DROP_CTINVALID "
|
||||
iptables -A CTINVALID -j DROP -m comment --comment "DROP_CTINVALID"
|
||||
|
||||
iptables -N CONNTRACK
|
||||
iptables -A CONNTRACK -m conntrack --ctstate ESTABLISHED -j ACCEPT
|
||||
iptables -A CONNTRACK -m conntrack --ctstate INVALID -j LOG_DROP
|
||||
iptables -A CONNTRACK -m conntrack --ctstate INVALID -j CTINVALID
|
||||
iptables -A CONNTRACK -p icmp -m conntrack --ctstate RELATED -j ACCEPT
|
||||
|
||||
# Restore any connection marks
|
||||
|
||||
Reference in New Issue
Block a user