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

Custom DNS wildcard for subdomains only #1515

Open
starsoccer opened this issue Jun 5, 2024 · 9 comments
Open

Custom DNS wildcard for subdomains only #1515

starsoccer opened this issue Jun 5, 2024 · 9 comments

Comments

@starsoccer
Copy link

From reading the documentation it seems like its currently possible to specify a domain and have all subdomains for it go to a single IP for example purposes Ill use 192.168.178.3 like the documentation. The documentation uses an example of printer.lan and then printer.lan, my.printer.lan or i.love.my.printer.lan will all resolve to the same IP(192.168.178.3).

I cant seem to find any documentation on how to specify an IP for all subdomains except the top level. For instance Id like to be able to do something like this in my config file:
*.printer.lan: 192.168.178.3

The above seems to be invalid, but I would expect it to do something like this:
printer.lan -> go to upstream dns my.printer.lan -> 192.168.178.3 something.printer.lan -> 192.168.178.3 i.love.my.printer.lan -> 192.168.178.3

Basically the goal being to have the top level domain still go to the upstream resolver but any subdomains to go to the hard coded IP.

@bcookatpcsd
Copy link

I literally think that is the exact example..

https://0xerr0r.github.io/blocky/latest/configuration/#custom-dns

   customDNS:
       customTTL: 300s
       filterUnmappedTypes: true
       mapping:
         pool.ntp.org: 172.16.254.241

drill -Q i.love.my.pool.ntp.org @10.120.0.247
172.16.254.241

(I do not see an * in the documentation.. you shouldn't have one either.. )

@starsoccer
Copy link
Author

@bcookatpcsd So in your example I want pool.ntp.org to continue to go to its regular IP however its normally resolved, but I want my.pool.ntp.org, as well as i.love.my.pool.ntp.org to go to 172.16.254.241.

Basically I want the top level domain to continue to be resolved like normal, but I want all subdomains to be resolved differently.

@bcookatpcsd
Copy link

I would start with this.. and see what you get then get to work..

https://0xerr0r.github.io/blocky/latest/configuration/#conditional-dns-resolution

or just hard code the records you want from the other domain and serve them as your own..

@starsoccer
Copy link
Author

I would start with this.. and see what you get then get to work..

https://0xerr0r.github.io/blocky/latest/configuration/#conditional-dns-resolution

or just hard code the records you want from the other domain and serve them as your own..

Im not sure I am following exactly on how I would use the conditional DNS to achieve what I want?

Regarding hard coding the records, that is probably the easiest option and is what I am currently doing. I just wanted to avoid the extra step of having to add every subdomain to blocky for it to be resolved. I was hoping there would be a way to just resolve all subdomains to one IP and then the top level fall back to the main resolver since the IP can change.

@garfieldairlines
Copy link

Just posting here to get notified as well, I wish to have

customDNS:
  customTTL: 96h
  mapping:
    *.example.net: 100.100.100.100,abc:def::123:4567

in my config, it would spare me something like… 30 lines.

Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Sep 21, 2024
@garfieldairlines
Copy link

Bot for the bump

@github-actions github-actions bot removed the Stale label Sep 22, 2024
Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Dec 21, 2024
@starsoccer
Copy link
Author

Bumping

@github-actions github-actions bot removed the Stale label Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants