From: Florian Westphal <fw@strlen.de>
To: ѽ҉ᶬḳ℠ <vtol@gmx.net>
Cc: "netfilter@vger.kernel.org" <netfilter@vger.kernel.org>
Subject: Re: [nftables v0.9.2 | kernel 4.19.93] logging protocols in inet family table require explicit protocol statement?
Date: Wed, 5 Feb 2020 15:29:35 +0100 [thread overview]
Message-ID: <20200205142935.GG26952@breakpoint.cc> (raw)
In-Reply-To: <7f4e6968-d2c8-7b14-0d42-137c7f7d7f85@gmx.net>
ѽ҉ᶬḳ℠ <vtol@gmx.net> wrote:
> Having perused the WIKI [1] I tried to get protocol specific logging going,
> but ended up with
>
> * tcp log -> Error: syntax error, unexpected log
> * icmpv6 log -> Error: syntax error, unexpected log
>
> Only with an explicit protocol statement logging works
>
> * ip protocol tcp log
> * ip6 nexthdr icmpv6 log
You mean "log" doesn't work? (no "tcp" prefix).
> cat /proc/net/netfilter/nf_log
> 0 NONE (nfnetlink_log)
> 1 NONE (nfnetlink_log)
> 2 nf_log_ipv4 (nf_log_ipv4,nfnetlink_log)
> 3 NONE (nfnetlink_log)
> 4 NONE (nfnetlink_log)
> 5 NONE (nfnetlink_log)
> 6 NONE (nfnetlink_log)
> 7 NONE (nfnetlink_log)
> 8 NONE (nfnetlink_log)
> 9 NONE (nfnetlink_log)
> 10 nf_log_ipv6 (nf_log_ipv6,nfnetlink_log)
> 11 NONE (nfnetlink_log)
> 12 NONE (nfnetlink_log)
This means that ipv4 is logged by nf_log_ipv4 and ipv6 via
nf_log_ipv6. Everything should be working for ipv4, ipv6 and inet
without any further action (provided you want to use printk-based
logging via dmesg rather than nfnetlink).
> Tried with
>
> echo "nf_log_icmp" > /proc/sys/net/netfilter/nf_log/1
There is no layer 4 logger. nf_log_XXX, where XXX is a l3 protocol
family, i.e. nf_log_{ipv4,ipv6,arp,bridge} or nfnetlink_log.
next prev parent reply other threads:[~2020-02-05 14:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-05 14:14 [nftables v0.9.2 | kernel 4.19.93] logging protocols in inet family table require explicit protocol statement? ѽ҉ᶬḳ℠
2020-02-05 14:29 ` Florian Westphal [this message]
2020-02-05 14:45 ` ѽ҉ᶬḳ℠
2020-02-05 14:48 ` Florian Westphal
2020-02-05 15:01 ` ѽ҉ᶬḳ℠
2020-02-05 15:37 ` Florian Westphal
2020-02-05 16:13 ` ѽ҉ᶬḳ℠
2020-02-05 16:21 ` Florian Westphal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200205142935.GG26952@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter@vger.kernel.org \
--cc=vtol@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox