Linux Netfilter discussions
 help / color / mirror / Atom feed
* arptables-nft and comments in nft output
@ 2023-10-28  8:20 Valentijn Sessink
  2023-10-28 10:02 ` Florian Westphal
  0 siblings, 1 reply; 3+ messages in thread
From: Valentijn Sessink @ 2023-10-28  8:20 UTC (permalink / raw)
  To: netfilter

Hi list,

I'm using arptables (nft iptables version 1.8.7) with
arptables -A OUTPUT -d 10.21.22.129 -j mangle --mangle-ip-s 10.21.22.161

Now I'm a bit confused by the nft output:

table arp filter {
	chain OUTPUT {
		type filter hook output priority filter; policy accept;
		arp htype 1 arp hlen 6 arp plen 4 arp daddr ip 10.21.22.129 counter 
packets 1288 bytes 54096 # --mangle-ip-s 10.21.22.161	}
}

The nft wiki only says "In the case of some missing translation, you 
will see a commented rule in nftables" - but it doesn't say what to do.

Now I'm confused. Does this mean that I cannot use "nft" to setup this 
very rule? Should I use "arptables-nft" to set this rule? Or is there 
another way?

Best regards,

Valentijn

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: arptables-nft and comments in nft output
  2023-10-28  8:20 arptables-nft and comments in nft output Valentijn Sessink
@ 2023-10-28 10:02 ` Florian Westphal
  2023-10-30 17:22   ` Florian Westphal
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Westphal @ 2023-10-28 10:02 UTC (permalink / raw)
  To: Valentijn Sessink; +Cc: netfilter

Valentijn Sessink <valentijn@sessink.nl> wrote:
> I'm using arptables (nft iptables version 1.8.7) with
> arptables -A OUTPUT -d 10.21.22.129 -j mangle --mangle-ip-s 10.21.22.161
> 
> Now I'm a bit confused by the nft output:
> 
> table arp filter {
> 	chain OUTPUT {
> 		type filter hook output priority filter; policy accept;
> 		arp htype 1 arp hlen 6 arp plen 4 arp daddr ip 10.21.22.129 counter
> packets 1288 bytes 54096 # --mangle-ip-s 10.21.22.161	}
> }
> 
> The nft wiki only says "In the case of some missing translation, you will
> see a commented rule in nftables" - but it doesn't say what to do.
> 
> Now I'm confused. Does this mean that I cannot use "nft" to setup this very
> rule? Should I use "arptables-nft" to set this rule? Or is there another
> way?

It might just be a missing translation.

You could try to see if this works:

nft add rule arp filter OUTPUT \
  arp htype 1 arp hlen 6 arp plen 4 arp daddr ip 10.21.22.129 \
  arp saddr ip set 10.21.22.161 counter

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: arptables-nft and comments in nft output
  2023-10-28 10:02 ` Florian Westphal
@ 2023-10-30 17:22   ` Florian Westphal
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Westphal @ 2023-10-30 17:22 UTC (permalink / raw)
  To: Florian Westphal; +Cc: Valentijn Sessink, netfilter

Florian Westphal <fw@strlen.de> wrote:
> Valentijn Sessink <valentijn@sessink.nl> wrote:
> > I'm using arptables (nft iptables version 1.8.7) with
> > arptables -A OUTPUT -d 10.21.22.129 -j mangle --mangle-ip-s 10.21.22.161
> > 
> > Now I'm a bit confused by the nft output:
> > 
> > table arp filter {
> > 	chain OUTPUT {
> > 		type filter hook output priority filter; policy accept;
> > 		arp htype 1 arp hlen 6 arp plen 4 arp daddr ip 10.21.22.129 counter
> > packets 1288 bytes 54096 # --mangle-ip-s 10.21.22.161	}
> > }
> > 
> > The nft wiki only says "In the case of some missing translation, you will
> > see a commented rule in nftables" - but it doesn't say what to do.
> > 
> > Now I'm confused. Does this mean that I cannot use "nft" to setup this very
> > rule? Should I use "arptables-nft" to set this rule? Or is there another
> > way?
> 
> It might just be a missing translation.

FWIW I've started to implement arptables-translate to provide the
needed translations.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-30 17:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-28  8:20 arptables-nft and comments in nft output Valentijn Sessink
2023-10-28 10:02 ` Florian Westphal
2023-10-30 17:22   ` Florian Westphal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox