MQTT via IPv6 on broker.hivemq.com

Dear HiveMQ Team,

I am using `broker.hivemq.com` for my IoT lecture at Hochschule München. Thanks a lot for providing this public, free-of-charge service.

When the FQDN `broker.hivemq.com` is resolved to IP-Adresses via DNS, IPv6 addresses are first returned, followed by some IPv4 addresses.

Connecting to `broker.hivemq.com` via IPv4 works fine as usual. However, using the IPv6 addresses, an MQTT connection is not possible.

This could either be a client problem on our side (we are using various MQTT tools and some Python libraries), or, it could be that `broker.hivemq.com` does not support MQTT via IPv6.

As a workaround, we are currently using www.mqtt-dashboard.com , which seems to be a DNS alias for `broker.hivemq.com` but is resolved only to IPv4, which keeps our clients functional.

So I have 2 questions:

  1. Is the broker on broker.hivemq.com supporting MQTT via IPv6?
  2. Is it save to rely on that www.mqtt-dashboard.com is resolved to IPv4 only?

Many thanks and best regards,
Georg

Hi @GeorgBraunHM

Welcome to the HiveMQ Community. It’s great to have you here, and we’re glad you’re exploring MQTT and HiveMQ.

At this time, broker.hivemq.com does not support MQTT connections over IPv6. Although some DNS queries may return IPv6 records, the broker itself is only reachable via IPv4.

If your MQTT client supports connections only via IP address rather than a fully qualified domain name (FQDN), you may use a workaround by resolving the hostname first and then connecting using the resulting IPv4 address. For example:

~ » nslookup broker.hivemq.com
Server:         192.168.2.1
Address:        192.168.2.1#53

Non-authoritative answer:
Name:   broker.hivemq.com
Address: 3.124.233.95
Name:   broker.hivemq.com
Address: 3.120.52.75
Name:   broker.hivemq.com
Address: 3.120.253.146
Name:   broker.hivemq.com
Address: 3.121.19.141
Name:   broker.hivemq.com
Address: 35.157.13.55
Name:   broker.hivemq.com
Address: 3.120.17.26
Name:   broker.hivemq.com
Address: 3.127.155.35
Name:   broker.hivemq.com
Address: 3.74.147.108

Please be aware that these IP addresses can change periodically—typically only a few times per year—so they should not be considered fully reliable for long-term static configuration.

We hope this information is helpful. If you have any further questions, please feel free to reach out.

Kind regards,
Dasha from HiveMQ Team

Dear Dasha and MiveMQ Team,

thanks for your reply.

Using static IPv4 addresses is not an option, since they can become invalid at any time as you already mentioned.

For our own programs, which are implemented in CPython and MicroPython, we can make sure that the DNS-Lookup-Results are filtered for IPv4. So we have a solution for this use case.

However, there are applications, like the famous “IoT MQTT Panel” on `https://play.google.com/store/apps/details?id=snr.lab.iotmqttpanel.prod\` and on https://apps.apple.com/us/app/iot-mqtt-panel/id6466780124 where we have no access to the source code.

For such applications, it is a killer when DNS provides an IPv6 address without having MQTT on IPv6.

Our current workaround is to replace broker.hivemq.com with www.mqtt-dashboard.com

This seems to work quite stable, as www.mqtt-dashboard.com is currently resolved to IPv4 address only.

So my remaining question is: Is it save to use www.mqtt-dashboard.com for the time being to get working IPv4 MQTT connections?

Many thanks and best regards,
Georg