DuckDNS/DNSMasq/Google Wifi Trouble

Hello, I’m somewhat new to home assistant but up until this point I’ve been able to setup everything I need and more. Recently I have been trying to setup a DuckDNS URL to access HA remotely (I currently use Nabu Casa but am looking for alternatives).

Information and Context:
HA Version: 2023.1.2
Host Server: Always on laptop, running HA on a Hyper-V VM
WiFi: Modem to Google WiFi Nest Hub (Connected wirelessly to host laptop)

At this point I’ve been through every thread, video, and documentation I can find to set this up but still have no success. I’ve even gotten to the point where I can’t seem to revert back to my old homeassistant.local:8123 URL that used to work on my local network, the only way I can access HA is through my NabuCasa URL.

  • I have installed the DNSMasq Addon and configured it as follows
defaults:
  - 8.8.8.8
  - 8.8.4.4
forwards: []
hosts:
  - host: XXX.duckdns.org
    ip: MY HA IP (I've also tried my public IP)
services: []
cnames: []
  • Setup DuckDNS Account as instructed, and configured DuckDNS HA as follows
domains:
  - XXX.duckdns.org
token: XXXXXX
aliases: []
lets_encrypt:
  accept_terms: true
  algo: secp384r1
  certfile: fullchain.pem
  keyfile: privkey.pem
seconds: 300

  • Updated config.yaml to include: (I’ve also tried omitting external and internal URL, switching them back to defaults, omitting base URL)
homeassistant:
  name: Home
  unit_system: imperial
  currency: USD
  country: US
  time_zone: "America/Los_Angeles"
  external_url: "https://XXX.duckdns.org" 
  internal_url: "http://homeassistant.local:8123"

  
http: 
 base_url: XXX.duckdns.org
 ssl_certificate: /ssl/fullchain.pem 
 ssl_key: /ssl/privkey.pem

  • Port Setup: I have port forwarding setup to the laptop that runs the HA server, wasn’t sure what else to do for this, Google makes you pick a device to setup forwarding on and I don’t see anything for the VM, but I set that to 8123 to 8123 as instructed. I have also edited my DNS settings to include my HA IP as the primary and 1.1.1.1 as the secondary DNS.

Results:
XXX.duckdns.org = “Invalid Host Header”
http://homeassistant.local:8123/ = " homeassistant.local didn’t send any data."
“[every other relevant IP Address I can find]” = Refused to Connect
Nabu Casa URL = Works Great - Only way I can access things.

Right now I’ve been through these settings so many times and tried so many different options that I am not sure what the correct values for them are anymore, I’m not sure which steps above I need or don’t, and I really just want to get this working. Any help would be appreciated, thanks!

I recommend the Nginx Proxy Manager addon. It works with DuckDNS, so you don’t need that add-on, and it provides a simple UI to manage access. And all you need in config is:

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.30.33.0/24
    - 127.0.0.1

Not 100% sure you need the above, but that’s what I’ve got.