Local and remote access by single URL

hello, just a question about te dnsmasq config:
you wrote:
address=/myurl.duckdns.org/192.168.2.21

I assume 192.168.2.21 is the local adresse of the machine
What does address mean ?

The same value 192.168.2.21 ?

I still have dnsmask runing but unable to connect from local network.
If I ping from local network myurl,duckdns.org I receive the local adress of the machine.
From external I can connect to hassio but not from local network.
Thanks for your help and best regards
Thierry

I had the same issue and tried all the suggestions and none worked for me. In the end I got fed up and installed WireGuard VPN add-on. Now I always use the local address to connect. When I’m not on my home network and I want to connect, I just connect to the VPN using the Wireguard app on my phone and Bob’s your uncle! Not a perfect solution, but it might be of some use to someone.

1 Like

that’s a creative idea but somehow setting up a DNS server would probably work better

I have found the missing steps in order to make it to work.
You have to use the IP of HA as a primary DNS in your router or in your active network card(manual assign of DNS IP).
Dnsmasq it will act like a middle man(DNS server) between your computer and internet. For your configured hosts it will forward to specified ip, and the rest of requests it will forward to the configured defaults.
In other to do that you need to ask him before external DNS server, that’s way it is not working because your network do not know about dnsmasq until you change DNS servers also in your network equipment.
In local network, ping request of your site should reply with local IP. Not externally IP of your router.

If people here are still interested. I made a tool that creates a bookmark that sends you to a local or web url dependent on the network you are currently connected to.