Connect Fritzbox Addressbook via Carddav to Nextcloud AIO behind NginX-Proxy?

Hi,

I use Nextcloud in my Home-Server behind a NginX-Proxy. The Fritzbox is the DHCP-Server and the DNS is handeled via a separat local Server with Adguard.

Access from outside works fine. So I use the Contacts on IOS in several devices. But the access from Fritzbox via the local LAN failled.

Any idea where to fix the problem?

Best regards
Namtscho

Did you try to use the private ip-address of your fritzbox, usually 192.168.178.1 to connect to it?

It is the other way around. In the Fritzbox I have to insert the URL of the Nextcloud contacts-app via Carddav.
This works fine with my old nextcloud installation on an raspi without the NginX-Proxy. Now I set up a new nextcloud AIO installation on an mini-PC and run both installations parallel. Therefore I need the proxy. Works fine, but the recently running connection to the raspi Nextcloud Carddav also fails now.
As I said, only the LAN connection to the Nextcloud Carddav fails. The Fritzbox only accepts https-connections.
May be that the problem is the ssl-certificate. This is now in the proxy and not in the nextcloud server.

So did you enter the nc domain in your fritz box?

In Adguard under filter → DNS-Umschreibung (third entry) you can define something like: 192.168.178.111 → Nextcloud.domain.tld - try this.

1 Like

Thanks for your quick response. The DNS Redirection did not help.

Complete Configuration:

1: Public access via fixed IP: example 111.111.111.111 (https://cloud.mydomain.com)

2: The Fritzbox routs port 80 and 443 to the NginxProxy 192.168.1.101

3: The Proxy routs to http://192.168.1.200:11000 (the Nextcloud AIO Server)
Routing to https://192.168.1.200:11000 did not work.
Seems to me ok, because the SSL-Certificate is located in the Proxy, not in the nextcloud.

External Access from https://cloud.mydomain.com/remote.php/dav/addressbooks/users/myown/contacts/ via IOS works fine.

In the Fritzbox-Admin I have to provide the https-link to this Carddav.
When I use the former shown link it fails.

From my LAN I call the Link:
http://192.168.1.200:11000/remote.php/dav/addressbooks/users/myown/contacts/
This also works fine.

But the Fritzbox needs an https link…

try curl cloud.mydomain.com inside your lan. what is the answer?

curl cloud.mydomain.com

The output is:

<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>openresty</center>
</body>
</html>

that´s the problem. your local dns does not resolve your cloud.mydomain.com

That was the idea with adguard.

other way could be to use pihole. with pihole, you have the possibility to do these dns settings, you need.

how to do this with adguard - not sure at all.

one thing that might help:

Thank you for the info. One year ago I replaced pihole width adguard because it seems to me more comfortable.

I thought the fritzbox is actually not envolved, because the DNS was handeled from adguard. In the Fritzbox I also set the adguard ip as DNS-Server. So the rebind in the fritzbox is not envolved because adguard is responsible for DNS. I tried the rebind and it will also not work.

One quick test fails. In adguard I set the DNS-Rewriting of cloud.mydomain.com to my public static ip-address 111.111.111.111. Uh… than nextcloud AIO shows an error message saying something with bruteforce-attack an the user was locked.

If there is no tipp for adguard I have to switch back to pihole. What DNS-Settings are there necessary?

best regards
namtscho

For Adguard, I have no other idea - not using it.
But why are you using the public ip for rewrite? Use the local IP

Setup of pihole: local DNS → DNS record → add → cloud.domain.tld - local ip

The problem is that there is no https access to Nextcloud AIO via local LAN. As I said, the NginXProxy has the ssl-certificate for cloud.mydomain.com installed. From there it was routed to localIP:11000. This is the local port of Nextcloud AIO. There is no ssl-access. The old Nextcloud is routed to localIP:80.

In my old Nextcloud-Installation(plain no AIO) I provide a self signed certificate. But I see no possibility to manage that for Nextcloud AIO.

Without the proxy and connecting the fritzbox direct to the old Nextcloud everything works fine in the past. But I want to use both in parallel, the old and the new Nextcloud. Therefore I installed the Proxy. Both are running for File-transfer. Only the local access via CalDav and CardDav to the new Nextcloud is missing. The old one is still running…

Now I connect the Fritzbox direct to my old Nextcloud(drill down to the last running configuration) without NginxProxy.

My Mail-Client connects to CardDav without Problems but the Fritzbox still not. This configuration runs since months. But! The only change was an update of the Fritzbox to the actual version 7.5. So now I think the problem is the box itself, not the network configuration.

Maybe I test a downgrade in the next days.

I switched back to the old installed netcloud(not AIO) and a pihole.
There was the same error and I was very frustrated. :cry:

After hours of searching I found the problem. :see_no_evil:

It was the size of the addressbook. Some days ago I include images of some contacts and that increased the storage space required for the file many times over. Deleting images the size decreases the file size from 6.900 KB to 480 KB.

Now it works again and I can start changing the system step by step to the new configuration with AIO.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.