A little help with my MQTT project please?

Dynam0

Just Hatched
Hi guys i have been mentioned my idea in a previous post but my lack of knowledge about MQTT and networking made me asking really abstract things without a structured plan in my head.

I think i have an incomplete project structure in my head right know but i need your help and knowledge to complete it. First of all i draw a quick scheme of what i want to accomplish. It will be a raspberry pi broker connected to 2 esp8266 clients, all in my local network. Now i want to be able to connect other clients outside my local network so they can send and receive from these clients. These outside devices will login to a database and receive their client identity that was pre-seted in the database,so they can be a part of the mqtt network until they logout. This is my main idea lacking in the middle. I mean in the orange box in the scheme what should i had ? A database + a webpage linked to my router port so the devices been authenticated from the database can communicate with the rest? And if so, how can i link many clients to a webpage so they can communicate successfully as separate nodes on the network?

Sorry if there are some mistakes in my thoughts:( And thanks for your time and help!
 

Attachments

  • mqtt.png
    mqtt.png
    34.1 KB · Views: 3
Hi,

I think the best thing you can do is make the connection to the router over 443 instead of port 80. If you are using standard mqqt port, you want to encrypt that communication using certificate.

What type of router is that? I would consider a proper firewall or UTM platform to handle IDPS.
 
Hi and thanks for your help (again:D). It is the default router my ISP provide me in my country (The only image with some specs i could find is below). I think you are right with the port number though;).

I have no idea how is it possible to connect devices via website and add them to mqtt network providing them with ID from database
 

Attachments

  • modem.png
    modem.png
    26.4 KB · Views: 3
Last edited:
As long as you use SSL/TLS to encrypt communication between external hosts, it should be okay.

Look into installing firewall behind the ISP router as those are not very effective against threats. Something like Sophos XG or similar.
 
Hi, hope you have managed to solve your problem already.
But if you didn’t, there is something that can help you with that. There is a guide written by the team behind Mosquitto MQTT broker, and it covers all the questions you ask in the OP. It also includes a step-by-step guide on how to enable TLS for an MQTT broker.
This guide on how to
Please, Log in or Register to view URLs content!
is the best I have seen on the Internet. Maybe it will give you some extra idea of what is wrong with your setup.
 

Log in

or Log in using
Back
Top