Re: How to Achieve Functionality Equivalent to iptables -m owner --socket-exist in nft?

Chen Linxuan <[email protected]> Fri, 18 Apr 2025 10:29:32 +0800
Newsgroups gmane.comp.security.firewalls.netfilter.general
Message-ID <CAC1kPDNdUO-v5UEJYZgtOL1iZTBBxteUdfaGDAAgVQNEzcoWYQ@mail.gmail.com>
Sunny73Cr <[email protected]> 于2025年4月17日周四 03:57写道:
>
> > --socket-exists
> > I just want to check is there a local socket associated with the packet or not.
>
> Apologies; I have misunderstood what this flag does.
> You could try:
> `iptables -A FORWARD mark -j MARK --set-mark $FWD_TAG`
> `iptables -A OUTPUT -m connmark --mark ! $FWD_TAG -j LOG --log-prefix OWN_SK`

I mean that I want a nft command equivalent to `iptables -A OUTPUT -m
owner --socket-exists -j LOG --log-prefix OWN_SOCKETS`.

Is the --socket-exist feature missing in nftable?

Best regards,
Chen Linxuan

>
> Regards,
> sunny
>
>