Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS bind multiple host #1401

Closed
3 tasks done
bestpika opened this issue Feb 10, 2020 · 12 comments
Closed
3 tasks done

DNS bind multiple host #1401

bestpika opened this issue Feb 10, 2020 · 12 comments

Comments

@bestpika
Copy link

Prerequisites

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

Problem Description

I want to bind the DNS host to 127.0.0.1 and ::1.
But the configuration only can set one address.

Work:

dns:
  bind_host: 127.0.0.1

Not work

dns:
  bind_host:
  - 127.0.0.1
  - ::1

Proposed Solution

Alternatives Considered

Additional Information

@bestpika bestpika changed the title Bind 127.0.0.1 and ::1 at the same time DNS bind multiple host Feb 10, 2020
@mbaran5
Copy link

mbaran5 commented Jun 7, 2020

Commenting to see if this is something that is possible? I am looking to install this on a system that already runs a DNS server (for local network lookups/overrides) so I need to be able to specify another IP (both IPv4 and IPv6) to use for the AdGuardHome configuration.

@panache67
Copy link

Being able to set multiple addresses as dns bind_host would be really beneficial, especially given that Ubuntu by default binds to 127.0.0.1:53 and thus Adguard cannot build to 0.0.0.0:53. Even if you only want to bind to one interface, e.g. eth0, it is absolutely needed to bind to multiple addresses to provide both ipv4 and ipv6 coverage.

@ameshkov ameshkov added this to the v0.106 milestone Sep 29, 2020
@stolenvw
Copy link

this would be really nice to have, i want to bind it to one ipv4 and one ipv6 ip, and not use 0.0.0.0:53 witch makes it bind to all ips on the computer (docker ips, bridged ips, ips on other interfaces)

@Technikte
Copy link

This is need to get the full usage with ipv4 + ipv6.

@Vartkat
Copy link

Vartkat commented Mar 15, 2021

I'm surely missing something... Running Adguard on Docker, Ubuntu 20.04 which has two NICs, one wired one wlan. Adguard binds to wlan, which is not what I want as the DNS set on DHCP server is the wired nic interface... And of course this behaviour is messing all my lan.

@ghost
Copy link

ghost commented Mar 15, 2021

This would be very useful since I'm currently forced to allow AGH to bind to everything just so that IPv4 and IPv6 DNS will both work, not to mention this does not work in a container (as far as I can tell).

Additionally, it doesn't seem possible to bind to both v4 and v6 on one specific interface (but not touch the others). IPv6 is only a thing if I configure AGH to bind to everything.

@cjustinhall
Copy link

+1. This needs resolved, please.

Are there any workarounds at the moment?

@ameshkov
Copy link
Member

Worry not, it's planned on the closest release.

adguard pushed a commit that referenced this issue Mar 23, 2021
Updates #1401.

Squashed commit of the following:

commit a18c3f0
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Mar 22 21:55:26 2021 +0300

    home: imp code

commit 2b4a28c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Mar 22 20:55:08 2021 +0300

    all: rm unused field

commit 5766a97
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Mar 22 16:40:14 2021 +0300

    all: support multiple dns hosts
@ainar-g
Copy link
Contributor

ainar-g commented Mar 23, 2021

As of snapshot 5d0d32b on the edge channel, this should be implemented, including a migration for the configuration file. The wiki has been updated as well, and it now documents the dns.bind_hosts parameter.

I will now close this issue. If you find any bugs with the new feature, please file them as separate bugs. Thanks!

@ainar-g ainar-g closed this as completed Mar 23, 2021
@cjustinhall
Copy link

cjustinhall commented Mar 23, 2021

@ainar-g I see this from the wiki -
'bind_hosts (after v0.106.0) - IP addresses on which to serve DNS queries. The addresses must be on different interfaces.'

My limited knowledge believes the ipv4 and ipv6 addresses are on the same interface. Are you saying by this comment that we would NOT be able to bind both an ipv6 and ipv4 address if they are on the same interface?

One of the requirements (for me/my use-case) is to have AGH listen on both ipv4 and ipv6...
[root@sig ~]# ifconfig
ens192: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.---------- netmask 255.255.255.0 broadcast 192.168.1.255
inet6 2601:---------- prefixlen 64 scopeid 0x0
inet6 2601:---------- prefixlen 128 scopeid 0x0
inet6 fe80::---------- prefixlen 64 scopeid 0x20
ether 00:0c:---------- txqueuelen 1000 (Ethernet)

With the change in place, how would I listen to both my ipv4 and ipv6 addresses on ens192?

@ainar-g
Copy link
Contributor

ainar-g commented Mar 24, 2021

@cjustinhall, you are correct! I've improved that section of our Wiki and also added examples as well as a note about 0.0.0.0.

@cjustinhall
Copy link

Had a look at the wiki. Good modifications. Very clear now. Thanks. Will give this a try.

adguard pushed a commit that referenced this issue Mar 24, 2021
Updates #1401.
Updates #2646.

Squashed commit of the following:

commit 93b025a
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Mar 24 16:41:07 2021 +0300

    home: fix migration, imp code
heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Updates AdguardTeam#1401.

Squashed commit of the following:

commit a18c3f0
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Mar 22 21:55:26 2021 +0300

    home: imp code

commit 2b4a28c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Mar 22 20:55:08 2021 +0300

    all: rm unused field

commit 5766a97
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Mar 22 16:40:14 2021 +0300

    all: support multiple dns hosts
heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Updates AdguardTeam#1401.
Updates AdguardTeam#2646.

Squashed commit of the following:

commit 93b025a
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Mar 24 16:41:07 2021 +0300

    home: fix migration, imp code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants