I am a newbie to MQTT, I was wondering how could one prevent a client who is not running in the same processor, where the broker is also running, to connect with the broker. In other way, restricting non-local MQTT clients from connecting to the broker.

I know there are different measures to security starting from username/password to SSL. But without any of these, are not there some means to define that no remote client shall ever succeed in establishing a connection?

  • Controlling the IP address may be a way to go...
    – rebatoma
    Oct 21 '20 at 10:50
  • are you asking about securing an MQTT connection on an unsecured server?
    – jsotola
    Oct 21 '20 at 17:56

As with any IP server you can control which interfaces/addresses the server binds to (listens on).

So if you only want clients on the same host as the broker to be able to connect then you just have the broker bind to rather than to (this is a shortcut to bind to all local interfaces)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.