I had tried using dnsmasq to some success, but then I still had to use port 8123 locally instead of 443 and it also seemed to completely kill my connection to wink.
At the moment on my phone I have just used a bunch of tasker shortcuts that automatically swap out the url based on if I am connected to my wifi or not, but this is extremely limiting!
Can anyone help get me to the ideal situation? If there are multiple extra components required or if I need to have specific features on my router or anything like that?
What I have done for my setup is told my router to forward all requests for home.smccloud.com to 172.16.6.11, however this will not forward the port. You’d have to setup a reverse proxy in Hass.io to get it to forward 443 to 8123. For me it doesn’t matter because 443 is forwarded to another network device.
I use duckdns and dnsmasq to accomplish exactly this same behavior.
In the dnsmasq config you should have a line like: address=/myurl.duckdns.org/192.168.2.21
This way, when a host on the network looks up myurl.duckdns.org, they are returned the LAN IP and not the WAN IP.
Instead of forwarding 443 to 8123 in your firewall rule, can you forward 8123 externally? With this setup, you should be able to use https://myurl.duckdns.org:8123 to access the interface on the LAN or WAN.
Unfortunately, my router doesn’t have ability to forward a specific requests like that it seems.
If I could get it to work with both on 8123 that would be an improvement, but when I had dnsmasq set up it seemed to stop wink from connecting so then I couldn’t use any of my lights!
Ideally, I would use 443 instead of 8123 as my workplaces network blocks non standard ports so then I’d not be able to access from the office.
You always have to forward some port to hass.io regardless of which one you are using stenvey just mentioned he isn’t able to connect to non standard ports from his office.
When setting server_port to 443 you basically tell hass.io to use that port instead of 8123. So you don’t need to forward 8123 anymore when setting server_port to anything else.
You could check if your router supports NAT Loopback to make your duckdns work from within your home network if you want to avoid setting up a local DNS server…
So I have set up dnsmasq in hassio and it works fine in terms of allowing me to use the same address inside and outside, but it seems to be blocking home assistant from connection to any remote services. Wink and Chamberlain both stop working as soon as I turn it on and start working again if I turn it off. Am I doing something wrong with the config?
I also set the config of my router to use 192.168.2.21 as my primary dns server, is that the right way to go about it?
Error:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘myqexternal.myqdevice.com’, port=443): Max retries exceeded with url: /api/v4/UserDeviceDetails/Get (Caused by NewConnectionError(’<urllib3.connection.VerifiedHTTPSConnection object at 0x6ecf04d0>: Failed to establish a new connection: [Errno -3] Try again’,))
i have the same problem, i only want to use myurl.duckdns.org from anywhere but HA wont let me save the change on dnsmasq address=/myurl.duckdns.org/192.168.2.21
I know this is an old topic but I’m having difficulties finding reference to this exact problem anywhere else. I can setup dnsmasq to work with duckdns and access it outside/inside LAN without issue, but dnsmasq seems to be blocking some of the devices own services (MET weather is the one I’m noticing immediately) and I am unsure of how to resolve this. I’ve configured static IP for the raspberry pi from my router (edgeOS) instead of setting it up via the built in connection manager, your post has me wondering if that’s the issue?
What I do is I let my family do it with the external url and on the lovelace UI i put a button to press if you are home that takes you to ip:8123. I know this isn’t what you are asking but it is an option. I like your concept though.