Receive IPv6 UDP messages

I am trying to receive UDP messages via IPv6. My Node-RED is in a docker where I activated IPv6. I am able to receive UDP messages via IPv4 but not via IPv6.

I tried following command for port forwarding without success.

May anybody help me?

Have you tried UDP outside of node-red but between your docker instance and the host?

With tcpdump I get following responses.

sudo tcpdump -i eth0 -u port 1881
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
07:28:36.574063 IP hn600487.ost.ch.53666 > hn700814.ost.ch.1881: UDP, length 17
07:28:40.276386 IP6 2001:620:1c0:1016:a92:4ff:fe8d:1833.65458 > 2001:620:1c0:1016:e65f:1ff:febb:244d.1881: UDP, length 17

If I listen to docker0 I cannot see anything for both IPv4 and IPv6. If this is not what you mean may you clarify the test you want me to perform?

THe tests you need to do are to get to a command line inside your docker then try to do udp to the host and visa versa. That way you are testing whether udp can cross the boundary at all (eliminating Node-RED as the possible problem).

I inserted following on docker.

otbr@raspberrypi:~ $ docker exec -it nodered sh
/usr/src/node-red # nc -u -l 1881

And then tried to send from my Raspberry Pi.

otbr@raspberrypi:~ $ nc -u 172.17.0.1 1881
"Test"

Nothing was received by nc in docker. But IPv4 works in Node-RED. What is wrong with my test?

I don't think it is your test or Node-RED that's wrong but rather your docker networking config. I'm afraid I'm no expert on docker though and you may need to ask in a docker support forum.

But IPv4 works to receive UDP message in Node-RED and does not work in my test either.

Thank you, I will try in a docker support forum.