diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2025-05-15 21:51:17 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2025-05-15 23:10:36 +0200 |
commit | 1fe54ec39a071ea3b06e6883e542dfdcf40d2840 (patch) | |
tree | bbde41cb29342dc31670b70ee40dafabd628bd07 /README | |
parent | 6067adc5d22497e90be523cc2e68d54ebf90696c (diff) |
build: bump release version to 2.0.9ulogd-2.0.9
Update library dependencies to latest available releases.
Add examples using nftables to the README file.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'README')
-rw-r--r-- | README | 38 |
1 files changed, 34 insertions, 4 deletions
@@ -58,15 +58,45 @@ to use. = NFLOG usage At first a simple example, which passes every outgoing packet to the -userspace logging, using nfnetlink group 3. +userspace logging, using nfnetlink group 3, in nftables: -iptables -A OUTPUT -j NFLOG --nflog-group 3 + ``` ruleset.nft ``` + table inet filter { + chain output { + type filter hook output priority filter; policy accept; + + log group 3 + } + } + ``` + +in iptables: + + # iptables -A OUTPUT -j NFLOG --nflog-group 3 A more advanced one, passing all incoming tcp packets with destination port 80 to the userspace logging daemon listening on netlink multicast -group 32. All packets get tagged with the ulog prefix "inp" +group 32. All packets get tagged with the ulog prefix "inp", in nftables: + + ``` ruleset.nft ``` + table inet filter { + chain intput { + type filter hook input priority filter; policy accept; + + tcp dport 80 log prefix "inp" group 32 + } + } + ``` + +in iptables: + + # iptables -A INPUT -j NFLOG -p tcp --dport 80 --nflog-group 32 --nflog-prefix inp + +See man nft(8) and section LOG STATEMENT for complete information on NFLOG. + +You can load your nftables ruleset with: -iptables -A INPUT -j NFLOG -p tcp --dport 80 --nflog-group 32 --nflog-prefix inp + # nft -f ruleset.nft See iptables -j NFLOG -h for complete information about NFLOG. |