UFW rules for Docker?

Hi all

I have installed a urbackup instance via Docker on a Ubuntu 22.04 server but cannot get a set of firewall rules to work. If I disable ufw then my windows clients will see the server and start backing up, but if I enable the firewall with what I believe to be a correct set of rules configured, the clients never see the server.

My configuration is as follows:

Docker set-up:

sudo docker run -d \
    --name urbackup \
    --restart unless-stopped \
    -e TZ="Europe/London" \
    -v /mnt/disk0/urbackup/backups:/backups \
    -v /mnt/disk0/urbackup/database:/var/urbackup \
    --network=host \
    --device /dev/zfs \
    uroni/urbackup-server:latest

UFW rules:

sudo ufw allow 55413/tcp
sudo ufw allow 55414/tcp
sudo ufw allow 55415/tcp
sudo ufw allow out 35623/udp

Does anyone know what I might be missing here?

Thanks in advance,
Nick

So I have enabled Internet Connection mode and this appears to be working now. Still a bit confused as to why but I’m guessing it is to do with the fact the Docker container has its own network, or something like that!