From: Olivier Alabeatrix <oalabeatrix@gmail.com>
To: netfilter@vger.kernel.org
Subject: validate IPsec outgoing packets using NFtables
Date: Mon, 06 Apr 2020 17:33:11 +0200 [thread overview]
Message-ID: <6db313e5d1d7ff43bfbf5a3457b40059daf10c69.camel@gmail.com> (raw)
Hi!
Using Debian 10/nftables v0.9.0, i'm having troubles having nftables
validate outgoing ipsec packets using the secpath meta.
This is part of a ruleset on R1, an IPsec gateway, that is supposed to
only forward traffic between 172.16.11.0/24 and 172.16.12.0/24 if it is
secured by Ipsec:
172.16.11.0/24-R1-----ESP-----R2-172.16.12.0/24
chain forward {
type filter hook forward priority 0; policy drop;
ip saddr 172.16.12.0/24 ip daddr 172.16.11.0/24 meta
secpath exists counter accept
ip saddr 172.16.11.0/24 ip daddr 172.16.12.0/24 counter
accept
log prefix "NFtables: FWD:"
counter drop
}
chain postrouting {
type filter hook forward priority 0; policy drop;
#never matching:
ip saddr 172.16.11.0/24 ip daddr 172.16.12.0/24 meta
secpath exists counter accept
ip saddr 172.16.12.0/24 ip daddr 172.16.12.0/24 counter
accept
log prefix "NFtables: POST:"
counter drop
}
While the forward chaine does match incoming ipsec-secured packets
using:
ip saddr 172.16.12.0/24 ip daddr 172.16.11.0/24 meta secpath exists
counter accept
The postrouting chain secpath rule never matches:
ip saddr 172.16.11.0/24 ip daddr 172.16.12.0/24 meta secpath exists
counter accept
What may I be doing wrong? Any help is welcomed.
next reply other threads:[~2020-04-06 15:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-06 15:33 Olivier Alabeatrix [this message]
2020-04-06 15:49 ` validate IPsec outgoing packets using NFtables 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=6db313e5d1d7ff43bfbf5a3457b40059daf10c69.camel@gmail.com \
--to=oalabeatrix@gmail.com \
--cc=netfilter@vger.kernel.org \
/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