MQTT Port Forwarding on Router NOT Working

Hello All,

I have a Home-Assistant Instance which I can access publicly using a static IP address. Now I am looking to subscribe to MQTT topic.

I was able to forward port 8123. Though for some reason I have not been able to open port 1883 on my router.

I spoke to my ISP and he is not aware about the ports being blocked. I am kind of stuck in no mans land, not sure how to proceed.

I would really appreciate if someone can please throw some light of wisdom on this issue.

Is the MQTT topic on your local network? Or from a source from the outside?

@Johanf obviously on local, as he wants to subscribe to it through port 1883 from outside, otherwise port forwarding doesn’t make sense :thinking:

@mishrankit9 check if port 1883 is open on the expected local IP?
This you can do with telnet, f.e.
telnet 1883
You could also try to set up a (temporary) mqtt broker on some other machine (windows or linux), and check if that works…

Your router should have a log where you can see if the rules are being hit.

I mean, if you can’t open port 1883 on the router - you can open any other port. You only have to make sure the INTERNAL port is 1883 - the external port can be anything.

The internal port can be set in the configuration

If mqtt is running on the same subnet as ha, port 1883 is all internal - you should not expose that to the outside world. If mqtt is external it’s a different story. Some routers are difficult to deal with “foreign “ ports. I ended up using an open source os on a router that could handle it - solved all my issues.

Dear All,

Thanks a lot for all your inputs. I am sorry that I was not able to reply to anyone of you. My problem seems to be solved for now. Given below is what I did.

I reset the Router and configured all the ports once again. My ISP says, this may have happen because he has exposed the Router on the static IP. I configured the 1883 port to a camera so that I was sure that port will land on my camera page. It worked so I did not change, now I am running my MQTT on 883.

I still have no clue what was wrong.