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
Using wildcard in additional_hostnames
prompts for admin privileges
#4881
Comments
Please explain your workaround for people who might run up against this. |
Updated IS with workaround. |
I was running into some seemingly unrelated trouble and as I was going through the troubleshooting guide, I noticed the DDEV Starts but Browser Can’t Access URL section. That seems to indicate that the reason why the problem in this issue might have been happening: My computer was unable to connect to the internet.
|
This comment was marked as off-topic.
This comment was marked as off-topic.
@gitressa most likely DDEV.exe on the Windows side is prompting you for escalated privs here and you need to give them. But please do |
This comment was marked as off-topic.
This comment was marked as off-topic.
Thanks, I'm going to mark everything else as off-topic. What seemed to be happening is |
Hi there. I'm having a similar situation (using linux here DDEV version v1.22.7) not sure if my scenario is different. I have a custom DNS server that maps any subdomain of *.websites.ddev.site to an IP: 192.168.1.40. Then DDEV is trying to run:
Which I think it won't have any effect in the hostname (it doesn't even add a new line to /etc/hosts anyways) So even with the mentioned workaround of adding this |
@mariano-dagostino I think it is the same thing. I imagine if you use explicit names in If you are able to make your DNS server respond to |
@rfay Thanks. Yes I'm able to make my DNS respond to *.websites I'm using blocky as custom dns provider: 0xERR0R/blocky#74 (comment) My problem is somehow ddev is not able to figure this out and attempts to alter the hostname and request password for this. |
For normal hostnames DDEV tries to look up the hostname, and if it succeeds (if it succeeds in this case looking up the actual record |
@rfay Thanks. Is IsHostnameInHostsFile the right function to modify or there is something else to look? |
No, it's AddHostsEntriesIfNeeded: ddev/pkg/ddevapp/hostname_mgt.go Lines 74 to 112 in faff807
The reason you're not being successful with your approach is obvious:
A PR to sort this out would be great! It's a pretty obscure corner case for DDEV usage so even though it's tagged for a release right now it's going to be hard for this one to really land on our plate. Lots of folks in the community have made great contributions, and it's not that hard. https://ddev.readthedocs.io/en/latest/developers/building-contributing/ |
I'm using
I can resolve any subdomain, and
I might try blocky this weekend to see what it is (I'm interested in adblocking and can test the DNS resolver). |
Remember that a proper test here requires using an IP address that is not 127.0.0.1 and is using a wildcard in additional_hostnames. |
It works for me with blocky. My config upstream:
default:
- 46.182.19.48
- 80.241.218.68
- tcp-tls:fdns1.dismail.de:853
- https://dns.digitale-gesellschaft.ch/dns-query
blocking:
blackLists:
ads:
- https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
clientGroupsBlock:
default:
- ads
ports:
dns: 53
http: 4000
customDNS:
mapping:
ddev.site: 127.0.0.1
test: 127.0.0.1 I started the
And finally test it with DDEV, it works for me:
Repeat the same with
|
Just a note though, you don't need custom DNS to do any subdomain with
|
Yes, it works when you have internet all the time, but when you are offline, it is the only reliable way to make DDEV work without requesting hosts to be edited. |
When actually offline, though, you'd normally want to let it create entries in /etc/hosts; that's what I do on a plane or whatever. But I guess you're talking about the situation where you have a local network but no internet reachability. |
I think we probably need a whole topic in the docs explaining what name resolution is, why it matters, how it's usually done, etc. And an FAQ pointing to it. |
I would appreciate it if you folks interested in this issue could: |
Is there an existing issue for this?
Output of
ddev debug test
ddev debug test
diagnostic information: https://gist.github.com/pyrello/81b43cba5124f073bd6bcc730c1d55a1Opening this bug per @rfay in conversation in Discord.
Expected Behavior
Not requiring administrative privileges to run
ddev start
Actual Behavior
Running
ddev start
requires admin privileges with our setup.There are two bugs here:
*.x.ddev.site
)Probably we should just notify people that if their wildcard is not resolvable (
*.*.ddev.site
should normally be resolvable) then they need to make it resolvable one way or another.Steps To Reproduce
Anything else?
In our project, we use DDEV for an application that runs more than 700 sites. We have it setup to provide all the sites locally at an address like
*.uiowa.ddev.site
. After upgrading to a new computer that does not allow me to have continuous access to administrative privileges, I am running into an issue where I see the following output when I runddev start
:Workaround
Adding a
config.local.yaml
file with the following settings allowed me to start ddev without it asking for my password:This allows the site https://sppa.uiowa.ddev.site to be available locally. The
config.local.yaml
file does not get checked in.The text was updated successfully, but these errors were encountered: