Issues when specifying external network as default
vitobotta opened this issue · 3 comments
Hi! I have a bunch of compose files all with this at the top:
networks:
default:
name: appsSo I can keep things organized into separate files but all apps can communicate over the same network. With ufw-docker it seems that a container cannot connect to a service on the host via the host public IP. So for example I am trying to configure Nextcloud so that it can connect to OnlyOffice and viceversa. OnlyOffice container must be able to connect to cloud.domain.com, via public interface (unless I find a way to make it work with an internal dns name). But such connections time out if ufw-docker rules are in place. If I disable it completely it works. Any suggestions? Do I need to run some command to configure something for this custom network called "apps"? Thanks!
I seem to have fixed it with sudo ufw allow from 172.18.0.0/16 where 172.18.0.0/16 is the range of the apps network. Is this the correct fix?
Yes, it is. It would be better if you can use a small range of networks, such as 172.18.xx.0/24
Awesome, thanks for confirming and for the project!