How can I access my Mosquitto Broker hosted on EC2 instance? - mosquitto

I have installed Mosquitto broker on EC2 instance but the mqtt client cannot access the broker.
What's the solution?

Likely you need to add the MQTT port 1883 (or 8883) to your security group to allow access from external client.

Related

Question about ip Adresse of mosquitto Broker

I have a problem with the ip address of the mosquitto Broker. Currently I'm trying to get mosquitto Broker running locally. I used Siemens PLCSIM Virtual Ethernet Adapter as connection and set its ip address to 192.168.0.10. The version of mosquitto Broker I am using is 2.0.15. I added the following two lines of code in mosquitto.conf
listener 1883
allow_anonymous true
and enter the following command in command prompt
mosquitto.exe -c mosquitto.conf -v
After that when I tested the local connection, everything worked fine. The ip address of mosquitto Broker is the ip address of Siemens PLCSIM Virtual Ethernet Adapter, which is 192.168.0.10 I set before.
For example, I now have an actual plc and want to pass data through mosquitto Broker. Suppose the ip address of the network I am connected to is 192.168.0.103. I would like to ask, what should I do if I want to make mosquitto Broker run online instead of locally? Do I need to make any changes to the mosquitto.conf file? And if mosquitto Broker is running on the network, is the ip address of mosquitto Broker 192.168.0.103?
As configured mosquitto will bind to ALL the IP addresses on the machine it is running on, there is no need to change it's configuration at all.
You need to configure any MQTT clients that want to connect to the broker to user the IP address of what ever interface the machine running the broker is connected to the same subnet as the client device (assuming no routing is taking place)

Install Jenkins on windows server and access it using VM's external ip [google-compute-engine]

I have created a VM instance with windows OS (windows-server-2019-dc-v20200211) in Google cloud.Established RDP connection and installed Jenkins on the VM, but how can I access it from other networks using the VM's external ip?
Could someone help me on this!!
Note: I want to install Jenkins in windows server and not on Linux.
I'll suggest you should check the following:
First, make sure your local firewall on windows server is enabled and allows connections on port 8080. Secondly, Network ACL for both incoming traffic on TCP 8080 and outcoming traffic on TCP port 8080 should be allowed.
Also check some of these stackoverflow use cases for more help: [1]https://superuser.com/questions/1212645/cannot-expose-jenkins-externally [2]https://apple.stackexchange.com/questions/31376/how-can-i-open-port-8080-of-mac-os-x-lion [3] Jenkins server is not accessible by host name (ip address)

Mosquitto brocker is used for only local host?

Can I publish and subscribe message in mosquitto broker using ESP8266?? Mosquitto is used mainly for local host?
My requirement is , i have ESP 8266 and STM32 board. Can I use mosquitto as broker ??
Mosquitto is a fully functional MQTT broker.
The default configuration will bind to all available interfaces on the host so it can be reached from any host on the network that knows the correct address.

MQTT protocol NGINX

I am currently planning to use MQTT protocol for a pub/sub app in IOS. My backend server is NGINX and I want to connect it using websockets. I haven't used MQTT before so my question is can I configure my NGINX server to be the message broker for the MQTT protocol or do I have to use NGINX as a proxy server for a message broker such as mosquitto library running on a different instance.
Nginx is not a MQTT broker, at best nginx can proxy for a broker but it can not act as one.
Nginx can proxy both native MQTT and MQTT over websockets when configured correctly.
The instance of the broker doesn't have to run on a separate machine, but you can use Nginx as a load balancer across a cluster of brokers if needed.

What is my web service ports to be allowed in the firewall?

Due to a virus in the system, one of our clients have made access to internet restricted in their server. We use two web services data on this server (both use a SOAP API).
The client company is asking me for the ports on the firewall they should leave open so we could be able to use those web services only. I'm not good at networks. So how can I get those information?
I need the port or any address from my two services so that they let them pass through the firewall.
I'm not sure I understand the question, but most web services receive connections on one of:
80 (http)
443 (https)
8080 (http)
Most firewalls client should be configured to allow outbound connections to these.
Server firewall MUST be configured to allow inbound connections on one of these (or some other pre-arranged non-standard port).
To work out what ports your existing web server is actually using:
how to investigate ports opened by a certain process in linux?
Its most likely, 80, 443, or 8080.

Resources