Home Assistant not accessible over public URL when connected to Wireguard VPN server

Hello everyone.

I am having problems connecting to my public URL (HTTPS) for my Home Assistant instance when connected to Wireguard over 5g. I believe I'm missing a setting because it works when I type the local IP address.

I'm also using NGINX server for the HTTPS redirect.

On the app, it says: NSURLErrorDomain -1200.

Any ideas?

Thanks a lot!

Is your Home Assistant connected via 5G or just your client from which you are trying to connect?

Hello. Just my client, my mobile phone. HA is on my local network, same as my Brume 2 gateway.

Mobile phone 5g - Brume 2 Wireguard - NGINX - HA.

And ping works fine so just DNS resolution fails?

Yes, just tested. I'm able to successfully ping the public address from my mobile on 5g, connected to the VPN server.

No, I mean: Can you ping your home assistant instance via the VPN tunnel? So do you know that the VPN works at all.

Yes, I'm able to ping it.

Here are my settings, just in case:

image

image

What DNS server do you use in your WireGuard config?
Should be the local one then or DNS won't work.

I'm using AdGuard, maybe this is the problem?

image

Client settings:

I am not sure if AdGuard Home knows about the local DNS entries.
You could try to force the resolving of your local home assistant DNS name:

Like 1.2.3.4 example.org

1 Like

Just tried turning off Adguard completely and still the same behavior. Shouldn't this fix the problem? Thank you.

Only if it IS the problem.

You need to figure out which DNS server answers the request. Is it your local router / client or is the request forwarded to your home router?

Got it. I'll investigate it further. I was wondering if since I set the VPN server to access the local network devices and NGINX is also on the same local network, they all have access to both inbound and outbound public internet packets, why this doesn't work. Thank you.

Can you access the the HA via Internal IP address?

Maybe draw a diagram?

I have similar problem but I sorted out with duck dns inside home assistant. Just open port forward in gl router.
If use https (ssl) then port 443 - 8123 (default homeassistant port)


My screenshot is my own homeassistant port :smirk: