-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Letsencrypt renewal issue since Virtualmin 7.20.0 #864
Comments
Hello Adam! Thanks for the heads up! Adam, this is indeed a bug on the Virtualmin side, as when we use Jamie, to be clear, we need to consider CNAME record as legitimate as well, e.g.:
|
Adam, please check this a287e6c patch and see if it solves the problem for you? |
Thanks Ilia for the fix! |
Welcome! |
I'm glad it worked! |
hi, Sorry to barge in but i think this should be chnaged, the function is not future proof and will cause issues in the near future. This function has some desing that hurts me because: 1/ it use external tools and not Net::DNS, output could be unreliable, Net::DNS seems installed on all my systems so is it in the basic install ?webmin use net::DNS in 2/ it does not support ipv6 or cname (well now it does for cname)3/ it use hardcoded google DNS 8.8.8.8, this will fail on secure network that force certain DNS server with firewall rules.Dont you think this will be an issue ? as i dont know perl i asked our friend gpt about this, tested it and seems to be working on cname and normal domains also.
|
This is optional and can be disabled upon request in Virtualmin.
We use
Well, IPv6-only configurations are still pretty rare. However, I agree that we need to consider it as well.
Alright, I would make the external DNS configurable as well. |
thanks, i am not directly concerned by those but the cname hit me on several domains. external tools can change their output that is why i dont like using them in a program. i saw that we can disable it but as the option is on by default even on allready configured domains i would have to check all domains of all sites on all servers to see if a cname is there (or ipv6 ) and go manualy change it one by one. :( thanks for the quick answer. |
I'd like to point out that DNS resolution check is a fallback in case normal request failed. |
humm from my issues i dont think so. are you sure it test dns only if the letsencrypt renew fails ? filter_external_dns seems to test all domains on renew, i see it filter on initial only if it fail but i dont see that in renewal on /usr/share/webmin/virtual-server/letsencrypt.cgi. |
I have checked the code, and to my surprise, we have different logic when Let's Encrypt is initially requested (upon domain creation) versus during renewal. For renewals, we indeed always test DNS resolvability! This is fixed in this 26256ff patch. |
Does this only effect renewals for the default domain? |
All renewals. |
@iliajie the current code will use the @aqueos I actually prefer to use external commands if possible, as relying on installed Perl modules just increases the installation complexity and dependencies of Webmin |
i agree that this check is a good thing to prevent issues with letsencrypt. The problem is the code that is not finished and has been deployed in production without support for things like cname or ipv6 so it locks the renewal of all letsencrypt using those :( @jcameron ok for dig , i would not, but this is a matter of personal preferences :) thanks to all for the quick action, i think after the test it should be pushed in production as it will block a lot of people that use the basic dns configuration that is: domain.com IN A x.X.X.X and each day can lead to sites being down with no ssl :) |
Yes, that's what I thought as well.
Yes, but that is something I decided to change. In my current view, I don't think we should re-check records in renewals that were previously successful.
Oh, alright! But why would we want to have it rechecked in renewals as well, assuming it worked in the past?
Well, it is fixed now!
Yes, I agree! We will try to make a new Virtualmin 7.20.1 release as soon as we agree on everything being discussed. |
I ran in the same issue. The auto certificate renewal failed.
The domain was named test.somedomain.com Set with a cname. The work around was switching off the checking. |
Sorry about that! We will fix it in the immediate Virtualmin 7.20.2 release! |
Please make sure to update repositories as soon as possible… cf #855 |
7.20.2 fixes the problem and is available via repositories 👍 |
Thanks for your work. Just one last thing that i recall now. When you buy a domain in France a lot of time it configure a basic zone with ip4 and ipv6 pointer to a welcome page of the registrar. This can lead to failure on letsencrypt on ipv4 host as letsencrypt prioritize ipv6 and fail. Got a lot of that on Ovh. So my point is : if you want to add foolproof check you can add a check that if you got a ipv6 on the domain then the host should have one too because, if not, this will fail. I guess the reverse is true but i never saw a domain with ipv4 and no ipv6 on a ipv6 host :) best regards. |
We do have that check already actually - if the domain has an IPv6 record in DNS but it's not enabled in Apache, Virtualmin won't even attempt to request the cert. |
Most likely related to this change:
I have a setup with a lot of sites that have their root record to a certain ip-address, and also aliasses for the www and mail subdomains. For example: bandhosting.be
The certificate setup in virtualmin is:
The result of a certificate renewal is, that the mail.bandhosting.be and www.bandhosting.be domains will not be requested due to the cleanup:
They all do point to the same ip though:
The result is a certificate, that is only valid for the root domain, and not the www and mail subdomains: https://bandhosting.be/
https://www.bandhosting.be/
https://mail.bandhosting.be/
The text was updated successfully, but these errors were encountered: