From: Pierre-Philipp Braun <pbraun@nethence.com>
To: Tim Lewis <elatllat@gmail.com>, netfilter@vger.kernel.org
Subject: Re: SNI filtering
Date: Tue, 12 Mar 2024 19:35:22 +0300 [thread overview]
Message-ID: <cf1d3838-f258-4c9f-afb6-d408d7490350@nethence.com> (raw)
In-Reply-To: <CA+3zgmt6ZK+VR5iAb5GKV+vgu5eeDHBFUb=9p+_-kQUziVawfw@mail.gmail.com>
On 3/11/24 21:56, Tim Lewis wrote:
> May we have an example of Server Name Indication (SNI) filtering on
> the nftables wiki? When using an environment without the variable
> position support of iptables string match, an example, maybe using
> eBPF, for SNI filtering with nftables would be helpful.
Is that even possible with stock nftables?
FWIW I tried xt_tls module with iptables (https://github.com/Lochnair/xt_tls). The original filter rule shows up as such
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
27 15363 DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443 TLS match host some-domain.com
while the resulting nftables filter rule shows up as such
table ip filter {
chain OUTPUT {
type filter hook output priority filter; policy accept;
meta l4proto tcp tcp dport 443 # TLS match host some-domain.com counter packets 10 bytes 5690 drop
}
}
but that's just firewalling. For interception, it doesn't work (https://github.com/Lochnair/xt_tls/issues/35).
--
Pierre-Philipp Braun
prev parent reply other threads:[~2024-03-12 16:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-11 18:56 SNI filtering Tim Lewis
2024-03-12 16:35 ` Pierre-Philipp Braun [this message]
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=cf1d3838-f258-4c9f-afb6-d408d7490350@nethence.com \
--to=pbraun@nethence.com \
--cc=elatllat@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).