1

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 at 10:50
  • are you asking about securing an MQTT connection on an unsecured server? – jsotola Oct 21 at 17:56
2

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 127.0.0.1 rather than to 0.0.0.0 (this is a shortcut to bind to all local interfaces)

| improve this answer | |

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.