Nextcloud SSRF rules and internal address ranges

I use Nextcloud, and have used the Nextcloud News app as my feed reader for a number of years.

Since moving all my hosting to a home lab, I noticed that Nextcloud News was unable to retrieve feeds from my own website, which was weird. Looking at the logs, I saw notes about "host violates local access rules".

This was a DNS issue (it's always DNS), right? Well, kind of.

In order to help prevent SSRF attacks, Nextcloud, by default, has protections against domains that resolve to internal IP address ranges. When I moved my sites to my homelab, I also setup DNS such that when on the local network, the services resolve to the local address range instead of the public external IP. This was the root of the problem.

Fortunately, there's a configuration setting for that:

// in the Nextcloud config.php:
[ 'allow_local_remote_servers' => true ]

After making that change and restarting Nextcloud, I was able to get it to resolve and access my feeds.