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

Best option for internal DNS A/PTR resolution? #1458

Closed
SlothCroissant opened this issue Mar 9, 2020 · 7 comments
Closed

Best option for internal DNS A/PTR resolution? #1458

SlothCroissant opened this issue Mar 9, 2020 · 7 comments
Labels

Comments

@SlothCroissant
Copy link

SlothCroissant commented Mar 9, 2020

Issue Details

  • Version of AdGuard Home server:
    • v0.100.9
  • How did you setup DNS configuration:
    • Installed on Raspberry Pi 3b+ devices
  • Operating system and version:
    • Raspbian GNU/Linux 9.8 (stretch)

Question

Hopefully usability questions are allowed here - I dug through the open/closed issues as well as the wiki and I'm still unsure of the answer:

I'm configuring my various devices as static in AGH, and I'm running into some confusion on the best way to do this. What's the difference between adding an internal client to:

  • /etc/hosts (This also is the way to get "client friendly names" in the UI, per the wiki)
  • DNS Rewrites (in AGH DNS Settings)
  • Clients (in AGH Clients Settings)
  • Custom filtering rules (in AGH Filters Settings)

I've currently got my devices all laid out in both /etc/hosts and in Custom Filtering Rules, and I'm resolving their A records works perfectly fine. So do I need both of these, or will only one be required? Also, what's the use case for Clients? Clients settings seems to be the only one that could possibly be specifically used for this purpose, but want to check.

Aside from all that - does /etc/hosts allow for rDNS/PTR lookups? I can't seem to get those working. My DHCP is running on the same Raspberry Pi, but I'm using isc-dhcp-server instead of the built-in AGH DHCP server (i need multiple scopes, etc). Should I make a new issue for this?

@ameshkov
Copy link
Member

ameshkov commented Mar 9, 2020

I see there's a confusion between clients and A/CNAME records.

DNS Rewrites (in AGH DNS Settings)
Custom filtering rules (in AGH Filters Settings)

DNS rewrites and custom filtering rules are supposed to add A/CNAME records.

/etc/hosts (This also is the way to get "client friendly names" in the UI, per the wiki)

This is a good way to assign client names, but it does not allow you configuring custom settings per client.

Clients (in AGH Clients Settings)

This one not only allows you to configure a human readable client name, but also lets you configure individual settings per client.

Aside from all that - does /etc/hosts allow for rDNS/PTR lookups? I can't seem to get those working. My DHCP is running on the same Raspberry Pi, but I'm using isc-dhcp-server instead of the built-in AGH DHCP server (i need multiple scopes, etc). Should I make a new issue for this?

I don't fully understand what you mean and what you're trying to achieve.

@SlothCroissant
Copy link
Author

SlothCroissant commented Mar 10, 2020

Thanks for the details. So for A records and UI client names, I'm on the correct path (except maybe moving to "Clients" instead of /etc/hosts as a better solution). I may open a feature request to have this simplified - PiHole does both DNS record lookups as well as UI client names via /etc/hosts, and I think it keeps things super simple, but I'm good with this for now.

I don't fully understand what you mean and what you're trying to achieve.

I'm looking for PTR/reverse DNS lookup support, and/or how to accomplish it. For example - I'd like to do a dig -x 10.1.1.5 and have it respond with svr01. Right now, the PTR call isn't responded to by AGH:

user@pc:~$ dig -x 10.1.1.5 @10.1.1.2

; <<>> DiG 9.11.5-P4-5.1ubuntu2.1-Ubuntu <<>> -x 10.1.1.5 @10.1.1.2
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 9634
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;5.1.1.10.in-addr.arpa.		IN	PTR

;; Query time: 24 msec
;; SERVER: 10.1.1.2#53(10.1.1.2)
;; WHEN: Mon Mar 09 19:37:25 CDT 2020
;; MSG SIZE  rcvd: 50

This worked on PiHole, and I see it referenced a bit here, I just can't determine how to configure it.

@ameshkov
Copy link
Member

Ah, got it, I guess this should be a feature request, we don't support PTR yet.

Would you like AGH to use /etc/hosts as a source for PTR responses?

@SlothCroissant
Copy link
Author

I believe this is the simplest solution - users are already probably using /etc/hosts for UI pretty names, so it'd be natural to do the reverse lookup / PTR against that source.

@ameshkov
Copy link
Member

@SlothCroissant would you like to convert this issue to a feature request or to file a new one?

@SlothCroissant
Copy link
Author

@ameshkov whatever works best for you guys - I'm new to AGH, so I'm not too versed with how you guys run issue tracking, etc. Let me know what I should do and I'll make it happen.

Thanks!

@ameshkov
Copy link
Member

Well, there seems to be already a feature request about /etc/hosts, I guess I'd better merge it there: #1478

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

No branches or pull requests

2 participants