@Johanf obviously on local, as he wants to subscribe to it through port 1883 from outside, otherwise port forwarding doesn’t make sense
@mishrankit9 check if port 1883 is open on the expected local IP?
This you can do with telnet, f.e. telnet 192.168.1.2 1883
You could also try to set up a (temporary) mqtt broker on some other machine (windows or linux), and check if that works…
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.
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.
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.