Docker on Router - firewall issues? Help

Hi all,

I am using docker on a Linux Ubuntu 18.04 Server which also is my file server, firewall, router, dns server,…

On the main machine are 2 Ethernet cards for the internal network in bridge configuration as well as another Ethernet card for the wan network. I am using also dnsmasq for dns and dhcp on the main machine.

I wrote my own firewall script and be happy with it so far.

All other services run in docker container. Now, I am using for example Zoneminder in a docker container and it works great as long as I start it with network: host and it can use the main port of the host machine.

My home network has the IP range 192.168.10.0-255. I have unblocked all traffic which come from internal devices to the server.

If I try to start docker-compose with something like ports 8080:80 and another network mode like bridge or so and try to access the ip:8080 of the main machine, I can’t access the container anymore.

I unblocked all local IPs with a negative rule from the docker-user chain, but that didn’t help either.

I am not sure what I am doing wrong, but I need help.

Looking forward to your answers.