* Creating named set
@ 2021-03-26 17:27 paul.guijt
2021-03-26 23:31 ` Florian Westphal
0 siblings, 1 reply; 3+ messages in thread
From: paul.guijt @ 2021-03-26 17:27 UTC (permalink / raw)
To: netfilter
Hi all,
On Raspbian I tried:
sudo nft add set inet filter blocklist { type inet_proto \; flags timeout \; }
Error: Could not process rule: No such file or directory
add set inet filter blocklist { type inet_proto ; flags timeout ; }
^^^^^^
I have tried all sorts of syntax, but every time that error comes up. Even with “% nft add set ip filter blackhole { type ipv4_addr\;}” from the wiki.
I have an inet table, and in it I want to drop anything coming from @blocklist. Can anyone please hand me the correct syntax, either for command line (sudo nft …) or for a rules file?
Best wishes, stay safe,
Paul
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Creating named set
2021-03-26 17:27 Creating named set paul.guijt
@ 2021-03-26 23:31 ` Florian Westphal
2021-03-27 9:41 ` paul.guijt
0 siblings, 1 reply; 3+ messages in thread
From: Florian Westphal @ 2021-03-26 23:31 UTC (permalink / raw)
To: paul.guijt; +Cc: netfilter
paul.guijt@gmail.com <paul.guijt@gmail.com> wrote:
> Hi all,
> On Raspbian I tried:
> sudo nft add set inet filter blocklist { type inet_proto \; flags timeout \; }
> Error: Could not process rule: No such file or directory
> add set inet filter blocklist { type inet_proto ; flags timeout ; }
^^^^^^
> I have tried all sorts of syntax, but every time that error comes up. Even with “% nft add set ip filter blackhole { type ipv4_addr\;}” from the wiki.
> I have an inet table, and in it I want to drop anything coming from @blocklist. Can anyone please hand me the correct syntax, either for command line (sudo nft …) or for a rules file?
This syntax is fine. The error comes from the kernel.
Either no 'inet filter' table exists, or your kernel lacks set
functionality.
^ permalink raw reply [flat|nested] 3+ messages in thread* RE: Creating named set
2021-03-26 23:31 ` Florian Westphal
@ 2021-03-27 9:41 ` paul.guijt
0 siblings, 0 replies; 3+ messages in thread
From: paul.guijt @ 2021-03-27 9:41 UTC (permalink / raw)
To: netfilter
Thanks.
This morning I had a brainwave, and inserted it into /etc/nftables.conf:
> #!/usr/sbin/nft -f
> flush ruleset
>
> table inet filter {
>
> set blocklist { type inet_proto ; flags timeout ; }
>
> chain input {
> type filter hook input priority 0; policy drop;
> }
> chain forward {
> type filter hook forward priority 0; policy drop;
> }
> chain output {
> type filter hook output priority 0; policy accept;
> }
>
> }
>
> include "/etc/nftables/include/*.nft"
Nft accepted it.
Best wishes, stay safe,
Paul
-----Original Message-----
From: Florian Westphal <fw@strlen.de>
Sent: Saturday, March 27, 2021 12:32 AM
To: paul.guijt@gmail.com
Cc: netfilter@vger.kernel.org
Subject: Re: Creating named set
paul.guijt@gmail.com <paul.guijt@gmail.com> wrote:
> Hi all,
> On Raspbian I tried:
> sudo nft add set inet filter blocklist { type inet_proto \; flags timeout \; }
> Error: Could not process rule: No such file or directory
> add set inet filter blocklist { type inet_proto ; flags timeout ; }
^^^^^^
> I have tried all sorts of syntax, but every time that error comes up. Even with “% nft add set ip filter blackhole { type ipv4_addr\;}” from the wiki.
> I have an inet table, and in it I want to drop anything coming from @blocklist. Can anyone please hand me the correct syntax, either for command line (sudo nft …) or for a rules file?
This syntax is fine. The error comes from the kernel.
Either no 'inet filter' table exists, or your kernel lacks set functionality.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-27 9:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-26 17:27 Creating named set paul.guijt
2021-03-26 23:31 ` Florian Westphal
2021-03-27 9:41 ` paul.guijt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox