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

Nameserver should respond with A and AAAA records for websites #69

Open
fauno opened this issue Oct 25, 2023 · 4 comments
Open

Nameserver should respond with A and AAAA records for websites #69

fauno opened this issue Oct 25, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@fauno
Copy link
Collaborator

fauno commented Oct 25, 2023

Since Godaddy doesn't support ALIAS records, we had to delegate a domain name to dns.he.net to create an ALIAS to api.distributed.press so it keeps IP addresses in sync, and NS to _dnslink for P2P protocols.

If the DP nameserver could craft answers for A/AAAA queries for websites pointing to its own IP address, it would be easy to just delegate the domain to DP and not having to configure a third party nameserver.

Right now it seems to be ignoring the query type, I ask for A records and returns TXT:

drill a custom.domain @api.distributed.press
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 57997
;; flags: qr rd ; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 
;; QUESTION SECTION:
;; custom.domain. IN      A

;; ANSWER SECTION:
custom.domain.    60      IN      TXT     "dnslink=/ipns/XXXX/"
custom.domain.    60      IN      TXT     "dnslink=/hyper/XXXX/"

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 179 msec
;; SERVER: 198.50.215.13
;; WHEN: Wed Oct 25 19:04:32 2023
;; MSG SIZE  rcvd: 222
@fauno
Copy link
Collaborator Author

fauno commented Oct 26, 2023

Also for completion respond to NS queries

@RangerMauve
Copy link
Contributor

Interesting, that means we'd need to tell the server what it's IPv4 and IPv6 is when launching it.

Here's what we'd need:

  • New (optional) options for ipv4 and ipv6 when initializing the server here
  • pass those options to the dns module
  • in the dns resolution code respond with those addresses for a and aaaa if the options were supplied
  • add test

@RangerMauve RangerMauve added the enhancement New feature or request label Nov 13, 2023
@fauno
Copy link
Collaborator Author

fauno commented Nov 13, 2023

Alternatively you could emulate ALIAS/ANAME by resolving the IP addresses from host option and craft A/AAAA records on the fly

@fauno
Copy link
Collaborator Author

fauno commented Nov 13, 2023

Support for this would make it simpler to set DNS records because you'd only have to set a single NS record to api.distributed.press. :D

More complex setups (ie. domains with subdomains and/or e-mail) could still use ALIAS/ANAME/A/AAAA/CNAME.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

2 participants