Can't get mosquitto broker to accept external connections

I have installed mosquitto and Mosquitto-clients on ubuntu, and everything works fine LOCALLY on localhost, but as soon as I try to connect from a remote machine I get “operation timed out”.

My port is opened and not blocked by any firewall.

mosquitto.conf file:

listener 1883
allow_anonymous true

what’s the issue? any help?

Have you checked that the port is reachable at all from the clients using telnet or netcat or similar tools?

$ telnet server 1883
Trying 192.168.0.10...
Connected to 192.168.0.10.
Escape character is '^]'.
[me pressing ^D]
Connection closed by foreign host.

On the server /var/log/mosquitto/mosquitto.log will show:

May 25 13:55:00 iac mosq: New connection from 192.168.0.93:36652 on port 1883.
May 25 13:55:02 iac mosq: Client <unknown> disconnected due to protocol error.