Connecting OpenHAB to Mosquitto in docker

First I tried to move my OpenHAB based HA to my new QNAP TS-453B as an APP or in docker. The NAS has IP address 192.168.1.200. Well it somehow worked but there were always something wrong with either USB ports, TCP ports, Z-wave etc. Then I moved OpenHAB to a Debian Stretch Virtual Mashine with it own IP address (192,168.1.201) and that worked well. My final step was to connect to Mosquitto.
The new VM OpenHAB worked fine with Mosquitto on my old Debian mashine, but I could not install it on the new VM (Debian Stretch package problems as described numerous times). Therefore a Container/Docker installation om the QNAP was another possibility and I have tried many variants.
I ended up with the simplest

    docker run -itd \
    --name="mosquitto" \
    --restart on-failure \
    -p 1883:1883 \
    -p 9001:9001 \
    eclipse-mosquitto

With this my TCP port scanner tells me that port 1883 is open, my Sonoff-Tasmota devices connect to Mosquitto and OpenHAB does NOT (log says 1:“MQTT Service initialization completed”, 2: “Starting MQTT broker connection ‘jum-mqtt’”, 3:“Connection lost”). OpenHAB uses the standard 1883 port.
The final attempt is:

    docker run -itd \
    --name="mosquitto" \
    --restart on-failure \
    --net=host \
    eclipse-mosquitto

This is the same except the “NAT” method where the specific ports 1883 and 9001 are replaced with access to any port (first-come-first-serve on . port allocation). Now my port scanner tells me that port 1883 is NOT open, but as well Sonoff-Tasmota devices and OpenHAB connects and works as expected.
I prefer much the “NAT” method as it have control of port usage, so my question is:

    1. Why does OpenHAB not connect with NAT method?
    1. Are there any suggestions to get it to work?
      Thanks!

You don’t have two openHAB with same client Id?

Where is openHABs MQTT.cfg pointed at, I assume the ip of your qnap since I think that’s where you’re running docker.

Last any firewall rules on the qnap that need to be opened? And can other devices connect to it, or mosquitto_sub pub utilities

Only one OpenHAB.
My mqtt.cfg includes “jum-mqtt.url=tcp://192.168.1.200:1883”.
About firewall rules. I dont think so. The Sonoff-Tasmota device connects every time to Mosquitto.