Hi. I am quite bad at this but will try to explain what I think I need.
My router doesnt have NAT-loopback option. I run Owncloud on RPI as well as pihole. I would like to access owncloud from home network and from outside of it from the same device (phone). I can do it now, but I have to change ip adress (external-internal).
RPI IP: 188.8.131.52
Phone home ip: 184.108.40.206 (with dns 220.127.116.11)
Phone 4G ip: subject to change
I created ex1.ddns.net adress to resolve to my external IP. I added a rule for pihole to resolve ex1.ddns.net to 18.104.22.168 (RPI) with help of Domain Redirect .
This config allows to me access Owncloud from home network. Log looks like this:
May 2 11:02:53 dnsmasq: query[A] ex1.ddns.net from 192.168.0.4
May 2 11:02:53 dnsmasq: config ex1.ddns.net is 192.168.0.250
I would like to access RPI (Owncloud) from outside of my home network without swapping ip.
edit1: I cant use pihole on router level, every device in my network is reconfigured to use RPI ip as DNS.