MQTT - can't connect, firewall, restrictions, IP blocked?

Hi there,

I’ve got an MQTT client that fetches message from TTN which is working fine from my office.
From home however, I cannot seem to connect, and I have no idea why.

Are there any blocking mechanism that I could have ran into?
There are no particular firewall restrictions or anything like that.

Thank you!

It seems some providers block the mqtt port. Have you tested your provider does not block the port?

3 Likes

It sounds like your firewall on your computer or router may be blocking the MQTT port.

And are you using the very same device (e.g., laptop) running that client in both networks, or did you set up a new instance of that client on another computer? (So: are you sure all settings are the same? Including the trusted certificates when using TLS?)

And what does the client give you as the result, there must be something more than “I cannot seem to connect”?

When in doubt about the client, then see also ttnctl subscribe to try with another (I think this uses MQTT as well).

I have no problems connecting to other MQTT servers, so I think it’s something different.

you can check if your ISP is blocking ports

also you didn’t answer Arjan ’ are you using the very same device (e.g., laptop) running that client in both networks, or did you set up a new instance of that client on another computer?

I wrote the message at the same time, before he posted. I have to test this when I’m at home again today and will try it.

@BoRRoZ this tool checks the reverse? I don’t need an incoming open port for the connection I believe?

1 Like

In case your ISP blocks MQTT port 1883, you can also try the TLS port 8883 (you will need the certificate file as well, as described here)

1 Like

As mentioned the ISP does not per se block it - I can connect to other servers without problem.

Note that TTN has been using Let’s Encrypt since August 2017, so one might not need to specifically use this PEM file if somehow one’s operating system already trusts that (common these days; search for an ISRG Root certificate) and if the client trusts the roots from the operating system.

(So, it would help to know if the same laptop is used. But well…)

2 Likes

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