firewall: Configure TRACE target to log to syslog

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Michael Tremer
2020-06-29 14:53:17 +00:00
committed by Arne Fitzenreiter
parent dcbdc8f587
commit 78b65ea7e3

View File

@@ -32,6 +32,10 @@ iptables_init() {
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
# Enable TRACE logging to syslog
modprobe nf_log_ipv4
sysctl -q -w net.netfilter.nf_log.2=nf_log_ipv4
# Empty LOG_DROP and LOG_REJECT chains
iptables -N LOG_DROP
iptables -A LOG_DROP -m limit --limit 10/second -j LOG