It too me a while to work out why my Nextcloud stuff wasn’t working on my phone. It wasn’t until I went to http://duckdns.org on mobile data I saw the block. I had changed ISP from one with IPv6, which I had setup, to an ISP without it, and thought it might be that. But it was just coincidence.
I’ve written to O2 but I doubt they will change anything, so I’ll be changing network.
So heads up UK O2 self hosting people!
It’s not the DNS server. I’m sure of this because Termux uses a different DNS server but does the same. I also tried setting my phone to use OpenDNS directly. I’m pretty sure they are inspecting the DNS traffic. Exactly so changing DNS server doesn’t help.
I don’t see a problem when using IP directly. I mean the IP is static, so I could must buy a domain, but I’d also have to piss about with my setup.
Modern Android versions can use DoH (DNS over HTTPS) which can not be intercepted. If you don’t have this option or are not sure how to configure it, you could use the Quad9 app to enable secure DNS. This way you can make sure it is not related to DNS. Frankly, I can’t imagine they are blocking the IPs of the DuckDNS servers directly.