I am trying to setup udp packet duplication. Usecase will be syslog messages. These messages are beeing sent to machine A ( xxx.xxx.xxx.177 : 5140 , debian 10). They are received by a service. With nftables I wanted to also send these packets to machine B (xxx.xxx.xxx.156 : 5140 , Win Server 2016).
What I tried is:
table ip sysTable { # handle 6
chain sysChain { # handle 1
type filter hook prerouting priority -300; policy accept;
udp dport 5140 counter packets 4 bytes 131 dup to xxx.xxx.xxx.156 # handle 2
}
}
Via netcat I am creating udp-messages from machine A to machine A. These messages are received by my application and also the nftable counter is increasing. tcpdump on box A shows the packets aswell
tcpdump udp port 5140
>>> 21:56:23.018877 IP xxx.xxx.xxx.177.12345 > xxx.xxx.xxx.177.5140: UDP, length 4
But nothing happens on box B. An UDP-Listener on Port 5140 shows nothing. A direct netcat from A to B works. Also tcpdump does not show the duplicate packet hopefully created by nftables.
I did not find many examples using nft dup in context with a specific port.
With friendly regards
Marc