Sometimes no connection to Nextcloud

I have Nextcloud running via the SWAG server, so far everything works perfectly.

For a few weeks now I’ve had the problem that on some days I can’t access Nextcloud from outside.

I have a script running on the server that tells the Dynamic DNS service my current IP address, as this changes every 24 hours.

If I compare the IP addresses (V4) in the Dynamic DNS service with the one in the router when the problem occurs, they are identical. Everything should work.

If I get a new IP address (V4) via the router and execute the script for the Dynamic DNS, everything works as usual again.

Does anyone have any idea what is causing the problem described?

Sounds like an ISP related issue and/or router issue causing issues when you get issued a new IP.

How can I get to the bottom of the problem with Linux?