You are not logged in.

#1 2022-12-11 01:57:14

vecino
Member
Registered: 2022-12-10
Posts: 139

[SOLVED] nftables does not know the protocol ospf

Hi,

I can´t use with nftables: ip protocol ospf counter accept for ipv4 and meta l4proto ospf counter accept for ipv6 in my firewall. I normally use it in Debian and Rocky Linux.

Dec 11 02:47:14 archlinux systemd[1]: Starting Netfilter Tables...
Dec 11 02:47:14 archlinux nft[490]: /etc/nftables.conf:13:15-18: Error: Could not resolve protocol name
Dec 11 02:47:14 archlinux nft[490]:                 ip protocol ospf counter accept
Dec 11 02:47:14 archlinux nft[490]:                            
Dec 11 02:47:14 archlinux nft[490]: /etc/nftables.conf:47:16-19: Error: Could not resolve protocol name
Dec 11 02:47:14 archlinux nft[490]:                 meta l4proto ospf counter accept
.

Linux archlinux 6.0.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 08 Dec 2022 11:03:38 +0000 x86_64 GNU/Linux

Last edited by vecino (2022-12-13 19:54:33)

Offline

#2 2022-12-11 02:07:06

vecino
Member
Registered: 2022-12-10
Posts: 139

Re: [SOLVED] nftables does not know the protocol ospf

Omg, just write 89 instead of ospf... big_smile

Offline

#3 2022-12-11 11:08:18

-thc
Member
Registered: 2017-03-15
Posts: 775

Re: [SOLVED] nftables does not know the protocol ospf

Or take a look at

/etc/protocols

and use "ospfigp" instead wink .

Offline

#4 2022-12-11 12:02:20

vecino
Member
Registered: 2022-12-10
Posts: 139

Re: [SOLVED] nftables does not know the protocol ospf

I'm a bit worried about this because I use nftables on several different routers (Debian, Rocky Linux, etc) and these these differences they're unnecessary problems. Something won't start because of such a small thing.

@-thc  Thanks for the tip smile

Offline

#5 2022-12-11 20:57:15

loqs
Member
Registered: 2014-03-06
Posts: 18,226

Re: [SOLVED] nftables does not know the protocol ospf

OSPFIGP might be usable across Arch,  Debian [1] and Rocky Linux ( Fedora) [2].

[1] https://salsa.debian.org/md/netbase/-/b … tocols#L44
[2] https://pagure.io/setup/blob/master/f/protocols#_105

Offline

#6 2022-12-12 12:34:07

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,241

Re: [SOLVED] nftables does not know the protocol ospf

/etc/protocols content does not come from nftables, but from https://www.iana.org/assignments/protoc … bers.xhtml .

I can't find what protocols nftables accepts from where  , but I do expect them to use iana assignments.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Online

#7 2022-12-12 12:52:00

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 667

Re: [SOLVED] nftables does not know the protocol ospf

nftables translates the names to numbers using /etc/protocols and /etc/services. Some time ago, for a release or two, it moved to a builtin hardcoded list, but then changed it back.

Offline

#8 2022-12-13 19:53:18

vecino
Member
Registered: 2022-12-10
Posts: 139

Re: [SOLVED] nftables does not know the protocol ospf

thank you all for your responses - you helped me = solved

Offline

Board footer

Powered by FluxBB