# Receive IPv6 UDP messages

**URL:** <https://discourse.nodered.org/t/receive-ipv6-udp-messages/73420>\
**Category:** General\
**Tags:** docker\
**Created:** [9 January 2023 15:39 UTC](https://discourse.nodered.org/t/receive-ipv6-udp-messages/73420 "2023-01-09T15:39:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaelAeOST](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/michaelaeost/32/74038_2.png) [@michaelAeOST](https://discourse.nodered.org/u/michaelAeOST)\
**Post date:** [9 January 2023 15:39 UTC](https://discourse.nodered.org/t/receive-ipv6-udp-messages/73420/1 "2023-01-09T15:39:04Z")

</div>

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.

- sudo ip6tables -A FORWARD -i eth0 -o docker0 -p udp --dport 1881 -m conntrack --ctstate NEW -j ACCEPT
- Chain forwarding using nftables (see [Securing network access to IPv6 docker containers | ungleich.ch](https://ungleich.ch/u/blog/securing-network-access-to-ipv6-docker-containers/))

May anybody help me?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [9 January 2023 21:11 UTC](https://discourse.nodered.org/t/receive-ipv6-udp-messages/73420/2 "2023-01-09T21:11:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![michaelAeOST](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/michaelaeost/32/74038_2.png) [@michaelAeOST](https://discourse.nodered.org/u/michaelAeOST)\
**Post date:** [10 January 2023 07:36 UTC](https://discourse.nodered.org/t/receive-ipv6-udp-messages/73420/3 "2023-01-10T07:36:24Z")

</div>

With tcpdump I get following responses.

```auto
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?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [10 January 2023 09:23 UTC](https://discourse.nodered.org/t/receive-ipv6-udp-messages/73420/4 "2023-01-10T09:23:03Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![michaelAeOST](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/michaelaeost/32/74038_2.png) [@michaelAeOST](https://discourse.nodered.org/u/michaelAeOST)\
**Post date:** [10 January 2023 10:24 UTC](https://discourse.nodered.org/t/receive-ipv6-udp-messages/73420/5 "2023-01-10T10:24:31Z")

</div>

I inserted following on docker.

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

```

And then tried to send from my Raspberry Pi.

```auto
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?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [10 January 2023 13:20 UTC](https://discourse.nodered.org/t/receive-ipv6-udp-messages/73420/6 "2023-01-10T13:20:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![michaelAeOST](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/michaelaeost/32/74038_2.png) [@michaelAeOST](https://discourse.nodered.org/u/michaelAeOST)\
**Post date:** [10 January 2023 13:33 UTC](https://discourse.nodered.org/t/receive-ipv6-udp-messages/73420/7 "2023-01-10T13:33:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [11 March 2023 13:34 UTC](https://discourse.nodered.org/t/receive-ipv6-udp-messages/73420/8 "2023-03-11T13:34:28Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
