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

Failure to us Custom Gateway on _dnslink defined TXT dnslink = records #659

Closed
neurocis opened this issue Jan 15, 2019 · 5 comments
Closed

Comments

@neurocis
Copy link

Ref #44
Ref #69

Ran into an issue whereby if a TLD only has a _dnslink TXT record but it would not use the Custom Gateway. Once I defined an @ TXT dnslink= record it used the Custom Gateway without issue.

@lidel
Copy link
Member

lidel commented Jan 15, 2019

@neurocis I feel I did not get the gist of the issue.
Do you mind providing steps / examples how to replicate?

@neurocis
Copy link
Author

Certainly, if in DNS for example.com I define:

_dnslink TXT dnslink=/ipfs/Qmblahblahblah

and the Companion is set to use the Custom Gateway, then I surf to http://example.com In my case I did not get redirected to the Custom Gateway http://127.0.0.1:8080/ipfs/Qmblahblahblah. Only when I defined:

@ TXT dnslink=/ipfs/Qmblahblahblah

and surfed to http://example.com did the redirect to use the Custom Gateway kick in.

Cheers!

@lidel
Copy link
Member

lidel commented Jan 15, 2019

Thank you. Are you sure the DNS record was correct or that the change propagated? If you are changing records via some web interface check if using full name _dnslink.example.com. (with dot at the end) helps.

If that does not work, compare your record against _dnslink that is known to work, eg. docs.ipfs.io for which DNSLink looks like this:

$ dig +noall +answer TXT _dnslink.docs.ipfs.io
_dnslink.docs.ipfs.io.	46	IN	TXT	"dnslink=/ipfs/QmVwAhBZSWCCs1UKMUUzDaT5gZM6bj64rjcn2vyhb2Dbgt"

ps. IPFS Companion is using DNS lookup API provided by go-ipfs, so you can use the same API to test if DNSLink is present via https://ipfs.io/api/v0/dns/docs.ipfs.io?r=true (where docs.ipfs.io is your domain)

@neurocis
Copy link
Author

Agreed, this appears to have been a propagation issue. I canot reproduce and confirm docs.ipfs.io only has the _dnslink defined. I also have to admit I checked my DNS through mxtoolbox.com and not what my local was resolving; adding the @ record must have triggered a local update.

Thank you for investigating and the pointer to the API. I will be doing much more with ipfs in the next few months so this is great!

Report can be closed - PEBCAK.

@lidel
Copy link
Member

lidel commented Jan 17, 2019

No problem, glad it works :)

ps. I spent some time on troubleshooting DNSLink once and it turned out that hotel wifi had custom DNS Cache server that was ignoring TTL and did force-caching records for about 1h. Switching local machine to a third party DNS like 8.8.8.8, 1.1.1.1 or 9.9.9.9 worked around that.

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

2 participants