title: Mosquitto MQTT broker not acknowledging external connections (even locally)
body: <p>I am having some problems with my Mosquitto MQTT broker which I do not understand. I had setup another Mosquitto broker in a Google Cloud Ubuntu 20.04 VM and it was working properly. I have moved to a self-managed Ubuntu 20.04 VM in my university and have <strong>not</strong> been able to connect to the broker ever since. A little background on the current setup:</p>
  <ul>
  <li>netfilter-persistent firewall (am unsure of the exact name of the firewall, this is the name of th service) has port 1883 open</li>
  <li>ufw is inactive</li>
  <li>the university has 2 levels in the firewall, one in the VM and one external. I have asked for the opening of ports 1883 (I am aware that only port 8883 should be open but this is temporary until I solve my issue)</li>
  <li>the VM is accessible from outside the LAN of the university, as checked in <a href="https://www.yougetsignal.com/tools/open-ports/" rel="nofollow noreferrer">https://www.yougetsignal.com/tools/open-ports/</a></li>
  <li>I have an Apache webpage running and it is also accessible externally</li>
  <li>I have NodeRED using port 1880 and it is also accessible externally</li>
  <li>My Mosquitto conf file looks like the following. For the time being, I am not using TLS authentication, as I first need to solve the issue with the connection.</li>
  </ul>
  <pre><code>allow_anonymous false
  password_file /etc/mosquitto/passwd
  
  listener 1883 0.0.0.0
  </code></pre>
  <p>However, I have not been able to enable the communication when using either the server IP or the domain name. If I attempt to connect using localhost, everything works:</p>
  <pre><code>~$ mosquitto_sub -h localhost -t test -p 1883 -u &quot;XX&quot; -P &quot;XX&quot; -d
  Client (null) sending CONNECT
  Client (null) received CONNACK (0)
  Client (null) sending SUBSCRIBE (Mid: 1, Topic: test, QoS: 0, Options: 0x00)
  Client (null) received SUBACK
  Subscribed (mid: 1): 0
  </code></pre>
  <p>If I attempt to connect with the domain name, I never receive an acknowledgment and the connection is never established:</p>
  <pre><code>~$ mosquitto_sub -h domain.com -t test -p 1883 -u &quot;XX&quot; -P &quot;XX&quot; -d
  Client (null) sending CONNECT
  Client (null) sending CONNECT
  Client (null) sending CONNECT
  Client (null) sending CONNECT
  Client (null) sending CONNECT
  </code></pre>
  <p>Mosquitto seems to be properly bound when running the <code>lsof -i</code> command in the console:</p>
  <pre><code>mosquitto 2177304       mosquitto    5u  IPv4 10127120      0t0  TCP *:1883 (LISTEN)
  mosquitto 2177304       mosquitto    7u  IPv4 10127251      0t0  TCP localhost:1883-&gt;localhost:47236 (ESTABLISHED)
  </code></pre>
  <p>I would appreciate it if anyone could guide me into what could be the root of my issue. If more information is needed regarding my setup, I will gladly provide it.</p>
  <p>Thanks in advance to all!</p>