2
I've set up a nextcloud server on a raspberry pi at my home which I can access from outside my wifi via a noip dyn-dns domain. From inside the network I can't use the domain though since that resolves to my external ip but not the internal ip of the raspberry.
For this I've found two approaches which both do not work in my case:
1.) The most widely advised approach would be to activate a NAT Loopback on the router. This is unfortunately not possible since my router doesn't support this and I'm not looking into buying a new one just for this use case.
2.) Changing local DNS entry. I'm running Linux and thus I could change /etc/hosts to map the domain to the internal ip. Works fine if I'm locally connected to my home network, but doesn't work if I want to connect from the outside. Perhaps there would be a way to circumvent this but then another major downside of this approach is that I'd need to edit the local DNS entries for multiple devices including Windows, iOS, and Android. So, I'd prefer to find a method which doesn't need to modify the several local clients but does it in a more centralistic way.
Is there any other way to resolve this?
How about assigning the Raspberry Pi a static IP address on the local network to ensure it's always the same regardless, and then internally on your network you just access that resource via it's static private IP address? The dynamic and external/public IP address access method is for external access and thus internally it's not really needed so I'd go with that sort or method if you don't have internal DNS server, etc. to point the IP address back of the ability to use NAT loopback. – Pimp Juice IT – 2017-02-18T09:18:22.883
Thanks for your reply, Walmart. Unfortunately, that's not a practical solution since the nextcloud client needs to be set up with a URL and changing that every time I connect to my wlan is not very convenient. Additionally I want to have several devices connected so I'm rather looking for some solution which doesn't require manual change everytime I connect. – onoSendai – 2017-02-18T14:40:11.610