Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

it is possible to install a broker MQTT in Google Cloud?

I tried to install my broker and the broker mosquitto in Google virtual machine but I can not connect with my machine.

I searched for several days the answer, but it still fails.

Already allowed the port 1883 on the server and have also tried disabling the firewall.

The question is whether it is possible to install a MQTT broker on Google Cloud so that accepts publications and subscribe to my local machine or other device?

if yes, what should I do?

like image 790
Gustavo Marin Suppi Avatar asked Oct 30 '22 23:10

Gustavo Marin Suppi


1 Answers

  • If you tried to disable your local firewall, that shouldn't be a problem, since any outbound connections are usually enabled by default.
  • If you tried to disable remote machine firewall, that is not enough, because there's Google Cloud network firewall in front of your VM.
  • Configure their firewall to allow incoming traffic to your port, TCP protocol. See https://cloud.google.com/compute/docs/networking

Note how you cannot disable network firewall, because it's a really bad idea. Instead you should configure your firewall to allow certain traffic and reject everything else.

like image 70
temoto Avatar answered Nov 15 '22 09:11

temoto