Adguard listening on 127.0.0.1 instead of the hassio ip?

Same here. It stopped working a few weeks a go and so only listening to 127.0.0.1, not to my hassio Pi IP address anymore. I did a reseach the whole day and did not find a solution.
I now installed Raspbian & AdGuardHome on a second Pi and it directly worked. But I’d like to get it back into Home Assistant agan :-/

hi any solution to the above?

Go to Adguard/Conf/AdGuardHome.yaml and edit the file adding your expected local IP address in the section dns: bind_hosts: restart Adguard image after that.

I cannot find this file, where can this be found?

I am using Debian so for me the exact location of this file is:

/usr/share/hassio/addons/data/a0d7b954_adguard/adguard/AdGuardHome.yaml

if you using a different installation it can be somewhere else.

go to addons and supervisor, click adguard, go to configuration, edit yaml and set bind_hosts to 0.0.0.0

certfile: fullchain.pem
keyfile: privkey.pem
ssl: true
dns:
  bind_hosts:
    - 0.0.0.0
8 Likes

Instead trying to force by adding config values, I chose to follow these steps https://www.reddit.com/r/homeassistant/comments/oeptmi/comment/h4bdhd8/?utm_source=share&utm_medium=web2x&context=3 which worked for me. All it required was saving the configuraiton page one time. Could probably save the configuration page before starting the first time and would solve the issue as well

4 Likes

You are a great human being, thank you!

1 Like

I found that if your device is using DHCP for it’s IP address, AdGuard will use the loopback address of 127.0.0.1. Set a static address and AdGuard will update to that address after a stop/start. Found under: Setting>System>Network

5 Likes

Just ran into this issue. Rebooting HA didn’t fix it. But, just before I went to reinstall Adguard Home, I clicked the restart button on the integration. Fixed, the setup page then showed it was listening on my 192.x LAN address, not 127.0.0.1

1 Like

Seems like the issue is not fixed yet 03.2023, had to dig the internet and the solution was

Go into Home Assistant -> Settings -> Add ons -> AdGuard Home -> Configuration tag
Click the save button on the network card without changing anything (although the button looks like it is disabled, you can still click it) -> finally hit the restart button```
6 Likes

Thanks. I did that and now I get two errors every time I refresh the filter list.


**[quote=“sirnicolas21, post:9, topic:310137, full:true”]
go to addons and supervisor, click adguard, go to configuration, edit yaml and set bind_hosts to 0.0.0.0

certfile: fullchain.pem
keyfile: privkey.pem
ssl: true
dns:
  bind_hosts:
    - 0.0.0.0

[/quote]

**

Adding the DNS bind worked like a charm!

2 Likes

I have the same 127.0.0.1 issue and no matter if I try the “Save” button in the network settings, update the AdGuard, change to static IP, change to external DNS, reboot, etc etc, it keeps showing the same 127.0.0.1.

Can someone shine some light on this noob query: how to I get to the “AdGuardHome.yaml” to change the bind_hosts? I have tried to find it with the File Editor or Studio Code Server but did not find it.

This the installation profile I got from the AdGuard log:

Add-on version: 4.8.4
You are running the latest version of this add-on.
System: Home Assistant OS 9.5 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2023.4.1
Home Assistant Supervisor: 2023.04.0

Cheers!

1 Like

This resolved my issue without setting static IP on my home assistant. This is what AdGuard configuration options say here:

If you want your server to accept requests on all interfaces and using both IP versions, for example if you run a public server, put one item with the unspecified IP of any version:

'dns':
    'bind_hosts':
    - '0.0.0.0'

Thanks a bunch!

There may be something odd going on with integration with HASSOS (although several versions newer than your original post HASS 2023.10.3 / HASSOS 11.0) as my AdGuard DHCP stopped working after a HASSOS update to v11.

This broke all IPv4 (IPv6 used autoconf) and changing config gave the same odd error (in text form to make it searchable for others…):

Error: control/dhcp/set_config | enabling dhcp: starting dhcp server: dhcpv6: finding interface eth0 by name: route ip+net: no such network interface | 400

Removing the extra dns: bind_hosts: config from the Addon config got DHCP working again, but it appeared blocking wasn’t working either. Re-adding the config back then seemed to work fine!

So…

Step 1 - remove dns: bind_hosts:

Settings → Addons → AdGuard Home → Configuration tab => (…) Edit in YAML and REMOVE three lines

ssl: true
certfile: fullchain.pem
keyfile: privkey.pem
dns:                       <==== REMOVE
  bind_hosts:              <==== REMOVE
    - 0.0.0.0              <==== REMOVE

Restart AdGuard.

Step 2 test AdGuard DHCP now works

Blocking probably doesn’t work.

Step 3 add back dns: bind_hosts:

Settings → Addons → AdGuard Home → Configuration tab => (…) Edit in YAML and ADD three lines

ssl: true
certfile: fullchain.pem
keyfile: privkey.pem
dns:                       <==== ADD BACK
  bind_hosts:              <==== ADD BACK
    - 0.0.0.0              <==== ADD BACK

Restart AdGuard.

Step 4 test AdGuard DHCP and blocking now works

Some other reports suggest just going into config and hitting save also fixed some issues (e.g. re-apply config).
I tried:

  • AdGuard → Settings → General Settings
  • Change nothing!
  • Save (Configuration successfully saved)

Then:

  • AdGuard → Settings → DHCP Settings
  • Select DHCP interface → Your LAN IP
  • Change nothing!
  • Save configuration (Configuration successfully saved - not no such network interface)

Why? Dunno! :man_shrugging:t2: :mage:t2:

1 Like

@FloatingBoater thanks for the tips

I’m curious: what are your HAOS networking ipv4 settings? Mine were all nulled out after the upgrade and I can’t recall what to put in the gateway and DNS fields. Is gateway my router address and DNS is the IP of my raspberry pi that is running home assistant? Or do I put external IP? Or router? It’s been running fine for so long I can’t remember how I had it setup…

Hi,
I suspect the root cause was the change of network interface names in HAOS11 breaking what AdGuard was bound to. That would explain why some folk reported just pressing SAVE fixed things - AdGuard found the new eth0 device name.

If you’re using AdGuard for blocking, the DHCP server needs to pass out the AdGuard IPv4 for DNS (likely the HASS IP), and the router IPv4 for default router (same as before - router IP).

The traffic routes the same, it’s just AdGuard selectively modifying DNS to block crap like Samsung wanting to know what TV you’re watching at all times.
TTFN,

James
If this helps, :heart: this post!

Thanks @FloatingBoater

Could you go to:
Settings->System->Network

Under IPV4 settings what do you have in the “Gateway address” and “DNS server” fields?

I can’t remember if we are supposed to put router IP (192.168.1.1) for both of those or just “Gateway address” and if the “DNS” field was supposed to include a traditional DNS (e.g. 1.1.1.1) or the IP of the raspberry pi that is running the home assistant software and adguard IP.

All of those settings were wiped out with the OS upgrade :frowning:

Hi,
I have a complex network with non-default RFC1918 IPv4 ranges so a screen shot won’t help you, but…

The HASS default IPv4 is Automatic to use DHCP, but using AdGuard it should be Static to avoid a loop of the server waiting for itself to get a DHCP.

Assuming you have:

  • Router IPv4 = 192.168.1.1
  • HASS IPv4 = 192.168.1.250 (EXAMPLE - assign something memorable and unused on your network)

HASS Settings->System->Network:

  • (*) Static
  • IP address/Netmask = 192.168.1.250/24 (assuming Class C)
  • Gateway address = 192.168.1.1
  • DNS servers = 192.168.1.1 (or could include the usual 1.1.1.1 or 8.8.8.8 - for the server only)

LAN clients will then use AdGuard’s DHCP to get an IPv4, and use the HASS IPv4 for their DNS server giving something like:

  • IP address/Netmask = 192.168.1.10 - from the pool you assigned in AdGuard DHCP
  • Gateway = 192.168.1.1 - the ISP router
  • DNS servers = 192.168.1.250 - HASS / AdGuard itself to give the filtering

If you’ve lost/changed the IPv4 settings on HASS itself, then you’ll also need to check other IPv4 like MQTT clients and ESPhome.

If this helps, :heart: this post!

2 Likes