Bext Practice Nextcloud WAN and LAN without NAT Reflection #5725
-
Hello everyone. I'm currently struggling with Nextcloud and a reverse proxy. I hope someone can give me a few tips. Previous configuration that needs to be changed. Firewall / DHCP / DNS: OPNSense on own hardware Docker host with own hardware Everything actually works from the LAN as well as from the Internet. But what bothers me: I have already tried Split DNS: What is your solution? Kind regards |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
Split dns is the correct way. See https://github.com/nextcloud/all-in-one?tab=readme-ov-file#how-can-i-access-nextcloud-locally |
Beta Was this translation helpful? Give feedback.
-
Hi szaimen, Unfortunately I can't solve the problem with the instructions. The NginxProxyManager runs on the same host as the Nextcloud AIO. The NPM has mapped port 443:443, so that the proxy can be reached via host address (192.168.0.x) and port 443. The proxy itself communicates via an internal network with http://nextcloud-aio-apache:11000 . Am I the only one with this problem? Or is there an error in my configuration after several hours of searching? Kind regards |
Beta Was this translation helpful? Give feedback.
-
Hello. Kind regards |
Beta Was this translation helpful? Give feedback.
-
Hi, it looks like you did not follow the instructions that I've sent here. |
Beta Was this translation helpful? Give feedback.
-
Hello szaimen, I found the error. I was looking in the wrong place. The proxy and Nextcloud settings were all correct. The problem was with the host. I'm using Photon here because the Docker host runs on a VMware ESXI. Photon seems to have very strict firewall rules by default. After looking at "iptables -L -v -n" I saw that the INPUT chain drops everything and doesn't allow any connections to the host interface from the bridge interfaces that Nextcloud creates. Using "ip link show" I first selected the bridge interface that belongs to the "nextcloud-aio" network created by Docker. In my case it's called "br-b7cfdd6aec7f" where the character strings are the first ones of the Docker network ID. Unfortunately that can change, but I'll come back to that in a moment. Anyway, I then created a rule using "iptables -A INPUT -i br-b7cfdd6aec7f -j ACCEPT" and the containers from the "nextcloud-aio" network can now reach the host and thus themselves via the proxy. This rule should of course be permanently stored in iptables. The one I just created disappeared after a reboot. Google tells you how to do this. My wish now would be for the nextcloud-aio master container to set a fixed name for the bridge when creating the network so that it always stays the same. My suggestion is "nc-bridge". This probably needs to be added to the file "php/src/Docker/DockerActionManager.php" in line 879ff. But I'm not sure about that, so I'm not creating a pull request for now. Maybe someone else has a better idea. I hope that if anyone else is faced with the same situation, they will find this post and save themselves a lot of searching. Thank you for your help so far. Kind regards Daniel |
Beta Was this translation helpful? Give feedback.
Hello szaimen,
I found the error. I was looking in the wrong place. The proxy and Nextcloud settings were all correct. The problem was with the host. I'm using Photon here because the Docker host runs on a VMware ESXI. Photon seems to have very strict firewall rules by default.
After looking at "iptables -L -v -n" I saw that the INPUT chain drops everything and doesn't allow any connections to the host interface from the bridge interfaces that Nextcloud creates.
Using "ip link show" I first selected the bridge interface that belongs to the "nextcloud-aio" network created by Docker. In my case it's called "br-b7cfdd6aec7f" where the character strings are the first ones of the Docker networ…