nlf / dlite

The simplest way to use Docker on OS X
MIT License
2.34k stars 54 forks source link

Starting the beta and specifying a .io domain breaks resolution of any .io domains at all #219

Open synic opened 7 years ago

synic commented 7 years ago

Bug Reports

dlite version 2.0.0-beta9

dlite is accessible on a .io domain

dlite is not accessible on a .io domain, and no .io domains can be resolved whatsoever

Specify a .io domain for the hostname, here is my config:

cpu: 2
disk: 20
dns: 192.168.64.1
docker: latest
extra: ""
hostname: ebdev.io
id: d3a0649d-e181-11e6-9f68-a0999b1068eb
memory: 3
route: true

This has happened before, I thought it was unrelated to dlite, however, I'm fairly sure it's dlite now. It has also happened to a coworker. Once you try to specify a .io domain, no .io domains will be resolvable (including the one you specified).

~]$ ping sentry.io
ping: cannot resolve sentry.io: Unknown host
[~]$ ping slither.io
ping: cannot resolve slither.io: Unknown host
[~]$

EDIT: It happens with .com domains too. Had to put github's IP in my /etc/hosts to make this post.

synic commented 7 years ago

Had to read dlite's source to fix it. In cmd_setup.go, it mentions /etc/resolver

In that directory, there were three files, all with the same contents. com, io and docker:

[resolver]$ cat com
nameserver 127.0.0.1
port 1053

Removing all the files, I am able to resolve domains again.

synic commented 7 years ago

Moving the resolve files to a more specific domain also fixes it

$ cd /etc/resolver
$ sudo mv io ebdev.io
nlf commented 7 years ago

ahhh yes, this is a good point. i should probably make it clear when choosing a hostname that the tld portion should be invalid since its dns lookups will be hijacked

i wonder if there's an api somewhere that will let me determine if a tld is valid or not..

ultiweb-zz commented 7 years ago

whois

From: Kubernetes Submit Queue notifications@github.com<mailto:notifications@github.com> Reply-To: nlf/dlite reply@reply.github.com<mailto:reply@reply.github.com> Date: Monday, January 23, 2017 at 1:23 PM To: nlf/dlite dlite@noreply.github.com<mailto:dlite@noreply.github.com> Cc: Subscribed subscribed@noreply.github.com<mailto:subscribed@noreply.github.com> Subject: Re: [nlf/dlite] Starting the beta and specifying a .io domain breaks resolution of any .io domains at all (#219)

ahhh yes, this is a good point. i should probably make it clear when choosing a hostname that the tld portion should be invalid since its dns lookups will be hijacked

i wonder if there's an api somewhere that will let me determine if a tld is valid or not..

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/nlf/dlite/issues/219#issuecomment-274572813, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAqpbXF-LfslFVj-3uRSK8FDDfgSypWFks5rVPANgaJpZM4LrNHo.

This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately.

synic commented 7 years ago

@nlf: perhaps if it IS valid, the entire domain should be used when creating the file.

This is something that the old dlite did not have a problem with

nlf commented 7 years ago

the old dlite also wasn't able to resolve containers :) the reason i setup the resolver for the whole tld is because when container routing is enabled you can do lookups for <containername>.<tld>