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

Add DNS zone via web interface #390

Closed
alvussar opened this issue Oct 18, 2018 · 20 comments
Closed

Add DNS zone via web interface #390

alvussar opened this issue Oct 18, 2018 · 20 comments
Labels
duplicate Duplicate or merged issues.

Comments

@alvussar
Copy link

Hello. I would like to be able to create your DNS zone based on Adguard Home through its interface. In order not to keep a few dns server. Thus, release port 53 for Adguard Home

@Who-42

This comment was marked as off-topic.

@ibksturm

This comment was marked as off-topic.

@prologic
Copy link

prologic commented Jan 2, 2019

To elaborate on @alvussar -- I have a similar use-case where up until now I've been using CoreDNS for my home network and several Docker Swarm mode clusters. I use CodeDNS for two purposes (//three really//):

  1. Locally host a zone so I can have both *.mydomain.com (//which is also publically available via DigitalOcean Name Servers//) and *.intern.mydomain.com (//which is only available internally to my network//)
  2. DNS Cache
  3. DNS Forwarder (//usually to Google DNS servers//)

So it would be nice if AdGuardHome also grew the ability to have locally hosted zones, created through the Web Interface, as well as an appropriate API to manage it that way too. It would also be really awesome if this was extended to PTR records for an IN-ARPA zone and integrated in the builtin DHCP server.

With this AdGuardHome now becomes a fully fledged and quite powerful tool to: Manage and Filter DNS, Provide DHCP leases (//with where to find name servers//) as well as locally hosted zones (//for those special enough to understand how that's useful//)

Thanks heaps! (//also happy to contribute to this as time permits//)

@ameshkov
Copy link
Member

ameshkov commented Jan 2, 2019

Hi @prologic, thanks for a detailed explanation!

Could you please share an example of the CoreDNS config file you're using? Just for us to better understand your needs.

@prologic
Copy link

prologic commented Jan 2, 2019

Certainly :) It's actually quite simple:

Corefile:
``
.:53 {
auto mydomain.com {
directory /data/zones
}
cache
health
proxy . 10.0.0.1:53 {
except mydomain.com
policy round_robin
}
prometheus 0.0.0.0:9153
errors stdout
log stdout
}


Right now my home network is a bit crippled in the fact I'm unable to resolve any local hostnames :) -- I can live with that for now because I'm loving AdGuardHome in general so I'll just have to remember a bunch of IP Addresses :D -- However I now do have an entire set of internal only applications that are now inaccessible until this feature is added.

@adrianmace
Copy link

I would also like this feature, with the ability to specify custom SRV records in particular to assist my Windows hosts with some service discovery that is not currently possible.

Previously I was achieving this with PiHole by including a secondary personal.conf file in the conf.d/ but this is seemingly not possible with AGH.

@jerrac
Copy link

jerrac commented Jul 5, 2020

Full DNS support would be amazing. As in, adding A, MX, CNAME, etc, records. I have not found any simple tool that does that, and AdGuardHome is already a DNS server, so it seems like a good fit.

That said, for simple stuff, wouldn't just adding a custom rule do the job?

Just add something like 192.168.222.123 foo.myhome.life to the /#custom_rules page, and I'd think you'd be good to go.

@Deanosim
Copy link

Deanosim commented Nov 2, 2020

I'd also like to add my support to bring this to adguard home, currently I'm using custom dnsmasq files under dnsmasq.d/ in pihole with docker, and with that I can create any dns record I want. It would be amazing if Adguard could support full dns records.

@jessechahal
Copy link

I'd also like to add my support to bring this to adguard home, currently I'm using custom dnsmasq files under dnsmasq.d/ in pihole with docker, and with that I can create any dns record I want. It would be amazing if Adguard could support full dns records.

Why do you do this manually in pihole? It is natively supported in the GUI for A and AAAA records. The next release of Pi-hole will support CNames (already merged to master but not in latest release).

@Deanosim
Copy link

Deanosim commented Nov 17, 2020

Because https://github.com/uklans/cache-domains has a script that exports to dnsmasq files and it's far too many entries to enter into the pi-hole web interface. but I don't just use dnsmasq config files for A records I also use srv and various other records for different things.

@0x9394
Copy link

0x9394 commented Aug 31, 2022

ability to setup dns zone would be great for home and company usage.
my personal use case is to provide mx records, for my home lab, to send alert/logs to local citadel mail server.

@ainar-g
Copy link
Contributor

ainar-g commented Sep 6, 2022

Isn't this largely already supported by the dnsrewrite rules? If anyone is still following this issue, could you please add your use cases that aren't currently covered by these? Thanks.

@ainar-g ainar-g added waiting for data Waiting for users to provide more data. and removed feature request P2: High labels Sep 6, 2022
@0x9394
Copy link

0x9394 commented Sep 6, 2022

does dnsrewrite support MX records? (not A record)

@ainar-g
Copy link
Contributor

ainar-g commented Sep 6, 2022

@kt1024, please read the Wiki section. It answers your question and provides an example:

||example.com^$dnsrewrite=NOERROR;MX;32 example.mail

@0x9394
Copy link

0x9394 commented Sep 6, 2022

got it. thanks

@ainar-g
Copy link
Contributor

ainar-g commented Sep 12, 2022

Since there were no other reactions, I'm inclined to close this issue as complete. If the dnsrewrite rule feature lacks functionality, please file new issues.

@ainar-g ainar-g closed this as completed Sep 12, 2022
@ainar-g ainar-g added duplicate Duplicate or merged issues. and removed waiting for data Waiting for users to provide more data. labels Sep 12, 2022
@VampiricAlien
Copy link

If the dnsrewrite rule feature lacks functionality, please file new issues.

@ainar-g I'm not sure if it lacks functionality but it's not straight forward as everything else Adguard does. I've spend the past week trying to set up a proxy so I can access something like app1.server.lan and app2.server.lan without use of ports or ip address. I had no such luck for my set up. It half worked or not at all. I wondered if Adguard could do it with a DNS rewrite but not how I thought and after looking at issues I found https://github.com/AdguardTeam/AdGuardHome/wiki/Hosts-Blocklists#dnsrewrite.

I think it could serve Adguard good and it's users to have an DNS Zone or better rewrite page in the web interface. It would make it easy to understand what is needed for an A, AAA, NX record. I understand how Domain Name System works but when it comes to adding rewrites to Adguard, I am stuck.

This is what I have based on information.

Any subdomain redirects to the server page. I'm sure you could point out where I've gone wrong, this was to being you my user case to hopefully bring a need for DNS zone.
Server is the hostname and .lan is the local domain (making it easier for anyone reading this to understand)

`server.lan^$dnsrewrite=NOERROR;A;192.168.5.100  <--- rediects the url to IP
server.lan^$dnsrewrite=NOERROR;MX;32 mail.server.lan <-- adds MX for local mail server (not tested)
_app1._tcp.server.lan^$dnsrewrite=NOERROR;SRV;10 60 9898 server.lan <--- rediect subdoamin to IP
_app2._tcp.server.lan^$dnsrewrite=NOERROR;SRV;10 60 443 server.lan
||server.lan^$dnsrewrite=NOERROR;HTTPS;32 server.lan alpn=h3` <--- makes sure all redirects go to https`

Sorry for the long read.

@ainar-g
Copy link
Contributor

ainar-g commented Apr 24, 2024

@VampiricAlien, please use Discussions for questions. Alsoif you want the community to help you, it's better to provide examples of queries that work vs. those that don't using e.g. dig.

@VampiricAlien
Copy link

@ainar-g I think you missed my whole point, it was more aimed at the need for the web interface to have an area to add DNS zones. I was adding my user case and showing an example of rewrites I was trying to use. If there was a better rewrite system it would make it easier to archive this.

@ainar-g
Copy link
Contributor

ainar-g commented Apr 25, 2024

I see. We might extend the current Filtering → DNS rewrites section in the future, but that's a bit in the air right now. Using dnsrewrite rules is the way to do that in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Duplicate or merged issues.
Projects
None yet
Development

No branches or pull requests