Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
My domain is: "http://www.infoalquiler.com.ar/"
I ran this command:
sudo certbot --apache --agree-tos --redirect --uir --hsts --staple-ocsp --must-staple -v
It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: infoalquiler.com.ar
2: www.infoalquiler.com.ar
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):
Requesting a certificate for infoalquiler.com.ar and www.infoalquiler.com.ar
Performing the following challenges:
http-01 challenge for infoalquiler.com.ar
http-01 challenge for www.infoalquiler.com.ar
Waiting for verification...
Challenge failed for domain infoalquiler.com.ar
Challenge failed for domain www.infoalquiler.com.ar
http-01 challenge for infoalquiler.com.ar
http-01 challenge for www.infoalquiler.com.ar
Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
Domain: infoalquiler.com.ar
Type: dns
Detail: DNS problem: SERVFAIL looking up A for infoalquiler.com.ar - the domain's nameservers may be malfunctioning; DNS problem: SERVFAIL looking up AAAA for infoalquiler.com.ar - the domain's nameservers may be malfunctioning
Domain: www.infoalquiler.com.ar
Type: dns
Detail: DNS problem: SERVFAIL looking up A for www.infoalquiler.com.ar - the domain's nameservers may be malfunctioning; DNS problem: SERVFAIL looking up AAAA for www.infoalquiler.com.ar - the domain's nameservers may be malfunctioning
Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server and that it is accessible from the internet.
Cleaning up challenges
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
My web server is (include version):
Server version: Apache/2.4.52 (Ubuntu)
Server built: 2023-10-26T13:44:44
The operating system my web server runs on is (include version):
Linux Mint 21.3 (Virginia) MATE Edition
My hosting provider, if applicable, is: Local Deployment
I can login to a root shell on my machine (yes or no, or I don't know): Yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): No
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot):
certbot 1.21.0
The issue is this one: I've followed this tutorial to enable properly an HTTPS connection on my Apache Server, to some domains setted up by making VirtualHosts.
So on, I've followed the steps provided by this tutorial:
(Properly Enable HTTPS on Apache with Let's Encrypt on Ubuntu)
Also this one, with a similar content:
(How To Secure Apache with Let's Encrypt on Ubuntu 22.04 | DigitalOcean)
Since I was getting that mentioned DNS error while trying that, I've looked for help to configure properly the DNS server on my system, using Bind9 for that purpose.
I've followed this tutorials for doing that:
(https://ubuntu.com/server/docs/service-domain-name-service-dns)
(https://www.youtube.com/watch?v=aTb9JeKp5TA)
(Video tutorial in Spanish)
After lots of attemps, I've could properly set up the bind service, having this output in my terminal:
leandro@leandro-Lenovo-B50-10:~$ sudo systemctl restart bind9.service
leandro@leandro-Lenovo-B50-10:~$ sudo systemctl status bind9.service
● named.service - BIND Domain Name Server
Loaded: loaded (/lib/systemd/system/named.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2024-03-18 04:25:38 -03; 4s ago
Docs: man:named(8)
Process: 15095 ExecStart=/usr/sbin/named $OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 15096 (named)
Tasks: 6 (limit: 9228)
Memory: 5.8M
CPU: 106ms
CGroup: /system.slice/named.service
└─15096 /usr/sbin/named -u bind
mar 18 04:25:38 leandro-Lenovo-B50-10 named[15096]: network unreachable resolving './NS/IN': 2001:503:ba3e::2:30#53
mar 18 04:25:38 leandro-Lenovo-B50-10 named[15096]: network unreachable resolving './NS/IN': 2001:500:12::d0d#53
mar 18 04:25:38 leandro-Lenovo-B50-10 named[15096]: network unreachable resolving './NS/IN': 2001:500:2::c#53
mar 18 04:25:38 leandro-Lenovo-B50-10 named[15096]: network unreachable resolving './NS/IN': 2001:500:9f::42#53
mar 18 04:25:38 leandro-Lenovo-B50-10 named[15096]: network unreachable resolving './NS/IN': 2001:dc3::35#53
mar 18 04:25:38 leandro-Lenovo-B50-10 named[15096]: network unreachable resolving './NS/IN': 2001:503:c27::2:30#53
mar 18 04:25:38 leandro-Lenovo-B50-10 named[15096]: network unreachable resolving './NS/IN': 2001:500:1::53#53
mar 18 04:25:38 leandro-Lenovo-B50-10 named[15096]: network unreachable resolving './NS/IN': 2001:500:2f::f#53
mar 18 04:25:38 leandro-Lenovo-B50-10 named[15096]: managed-keys-zone: Key 20326 for zone . is now trusted (acceptance timer complete)
mar 18 04:25:38 leandro-Lenovo-B50-10 named[15096]: resolver priming query complete: success
I've ran this command with this output:
leandro@leandro-Lenovo-B50-10:~$ nslookup www.infoalquiler.com.ar 127.0.0.1
Server: 127.0.0.1
Address: 127.0.0.1#53
www.infoalquiler.com.ar canonical name = infoalquiler.com.ar.
Name: infoalquiler.com.ar
Address: 127.0.0.1
Name: infoalquiler.com.ar
Address: ::1
In the Bind log file I got this:
client @0x7f5d4c1e9108 127.0.0.1#60629 (www.infoalquiler.com.ar): query: www.infoalquiler.com.ar IN A + (127.0.0.1)
client @0x7f5d4c1e9108 127.0.0.1#44262 (infoalquiler.com.ar): query: infoalquiler.com.ar IN AAAA + (127.0.0.1)
Also, ran this with this output:
leandro@leandro-Lenovo-B50-10:~$ dig infoalquiler.com.ar CAA
; <<>> DiG 9.18.18-0ubuntu0.22.04.2-Ubuntu <<>> infoalquiler.com.ar CAA
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 45259
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;infoalquiler.com.ar. IN CAA
;; Query time: 288 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Mon Mar 18 02:34:06 -03 2024
;; MSG SIZE rcvd: 48
However, despite after lots of attemps, I'm still getting the same DNS error.
Here's my most relevant Bind9 config files at "/etc/bind":
"named.conf":
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
"named.conf.options":
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
forwarders {
127.0.0.53;
};
//========================================================================
// If BIND logs error messages about the root key being expired,
// you will need to update your keys. See https://www.isc.org/bind-keys
//========================================================================
dnssec-validation auto;
listen-on { any; };
listen-on-v6 { any; };
allow-query { any; };
};
"named.conf.local":
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "infoalquiler.com.ar" {
type master;
file "/etc/bind/db.infoalquiler";
};
zone "127.0.0.in-addr.arpa" {
type master;
file "/etc/bind/db.127.0.0.in-addr.arpa";
};
logging {
channel query.log {
file "/var/log/named/query.log";
severity debug 3;
};
category queries { query.log; };
};
"db.infoalquiler":
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA infoalquiler.com.ar. root.infoalquiler.com.ar. (
20 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS infoalquiler.com.ar.
@ IN A 127.0.0.1
mail IN A 127.0.0.1
www IN CNAME infoalquiler.com.ar.
;@ IN MX 10 127.0.0.1
cisco IN A 127.0.0.1
ns IN A 127.0.0.1
@ IN AAAA ::1
infoalquiler.com.ar. IN CAA 0 issue "letsencrypt.org"
"db.127.0.0.in-addr.arpa":
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA infoalquiler.com.ar. root.infoalquiler.com.ar. (
20 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS infoalquiler.com.ar.
10 IN PTR infoalquiler.com.ar.
My Apache config files at "/etc/apache2": are like this:
"apache2.conf" (It has just the default content, except for this line):
...
# Global configuration
#
ServerName 127.0.0.1
...
"ports.conf":
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
Listen 80
<IfModule ssl_module>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
At "/etc/apache2/sites-available" I've got:
"000-default.conf":
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
"infoalquiler.conf":
<VirtualHost *:80>
ServerAdmin leandrocaplan@gmail.com
ServerName infoalquiler.com.ar
ServerAlias www.infoalquiler.com.ar
DocumentRoot /var/www/html/infoalquiler/public
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/html/infoalquiler>
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
"default-ssl.conf":
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on
# A self-signed (snakeoil) certificate can be created by installing
# the ssl-cert package. See
# /usr/share/doc/apache2/README.Debian.gz for more info.
# If both key and certificate are stored in the same file, only the
# SSLCertificateFile directive is needed.
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
# Server Certificate Chain:
# Point SSLCertificateChainFile at a file containing the
# concatenation of PEM encoded CA certificates which form the
# certificate chain for the server certificate. Alternatively
# the referenced file can be the same as SSLCertificateFile
# when the CA certificates are directly appended to the server
# certificate for convinience.
#SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt
# Certificate Authority (CA):
# Set the CA certificate verification path where to find CA
# certificates for client authentication or alternatively one
# huge file containing all of them (file must be PEM encoded)
# Note: Inside SSLCACertificatePath you need hash symlinks
# to point to the certificate files. Use the provided
# Makefile to update the hash symlinks after changes.
#SSLCACertificatePath /etc/ssl/certs/
#SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt
# Certificate Revocation Lists (CRL):
# Set the CA revocation path where to find CA CRLs for client
# authentication or alternatively one huge file containing all
# of them (file must be PEM encoded)
# Note: Inside SSLCARevocationPath you need hash symlinks
# to point to the certificate files. Use the provided
# Makefile to update the hash symlinks after changes.
#SSLCARevocationPath /etc/apache2/ssl.crl/
#SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl
# Client Authentication (Type):
# Client certificate verification type and depth. Types are
# none, optional, require and optional_no_ca. Depth is a
# number which specifies how deeply to verify the certificate
# issuer chain before deciding the certificate is not valid.
#SSLVerifyClient require
#SSLVerifyDepth 10
# SSL Engine Options:
# Set various options for the SSL engine.
# o FakeBasicAuth:
# Translate the client X.509 into a Basic Authorisation. This means that
# the standard Auth/DBMAuth methods can be used for access control. The
# user name is the `one line' version of the client's X.509 certificate.
# Note that no password is obtained from the user. Every entry in the user
# file needs this password: `xxj31ZMTZzkVA'.
# o ExportCertData:
# This exports two additional environment variables: SSL_CLIENT_CERT and
# SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
# server (always existing) and the client (only existing when client
# authentication is used). This can be used to import the certificates
# into CGI scripts.
# o StdEnvVars:
# This exports the standard SSL/TLS related `SSL_*' environment variables.
# Per default this exportation is switched off for performance reasons,
# because the extraction step is an expensive operation and is usually
# useless for serving static content. So one usually enables the
# exportation for CGI and SSI requests only.
# o OptRenegotiate:
# This enables optimized SSL connection renegotiation handling when SSL
# directives are used in per-directory context.
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
# SSL Protocol Adjustments:
# The safe and default but still SSL/TLS standard compliant shutdown
# approach is that mod_ssl sends the close notify alert but doesn't wait for
# the close notify alert from client. When you need a different shutdown
# approach you can use one of the following variables:
# o ssl-unclean-shutdown:
# This forces an unclean shutdown when the connection is closed, i.e. no
# SSL close notify alert is send or allowed to received. This violates
# the SSL/TLS standard but is needed for some brain-dead browsers. Use
# this when you receive I/O errors because of the standard approach where
# mod_ssl sends the close notify alert.
# o ssl-accurate-shutdown:
# This forces an accurate shutdown when the connection is closed, i.e. a
# SSL close notify alert is send and mod_ssl waits for the close notify
# alert of the client. This is 100% SSL/TLS standard compliant, but in
# practice often causes hanging connections with brain-dead browsers. Use
# this only for browsers where you know that their SSL implementation
# works correctly.
# Notice: Most problems of broken clients are also related to the HTTP
# keep-alive facility, so you usually additionally want to disable
# keep-alive for those clients, too. Use variable "nokeepalive" for this.
# Similarly, one has to force some clients to use HTTP/1.0 to workaround
# their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
# "force-response-1.0" for this.
# BrowserMatch "MSIE [2-6]" \
# nokeepalive ssl-unclean-shutdown \
# downgrade-1.0 force-response-1.0
</VirtualHost>
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
EDIT: I only have "000-default.conf" and "infoalquiler.conf" in my "/sites-enabled" directory as symlinks
As a detail, I've also ran the following command with the following output:
leandro@leandro-Lenovo-B50-10:~$ cat /etc/resolv.conf
# This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.53
options edns0 trust-ad
search fibertel.com.ar
I wonder if this result has something to do when setting the "fowarders" field on my "named.conf.options", I may be doing something wrong there
I've also checked this issues at the community, but didn't really helped:
(Help! , The DNS problem)
(DNS problem: SERVFAIL looking up A)
I can properly access my domain defined on my VirtualHost Apache files like this:
However, I'm not being able to set up properly an HTTPS configuration to run it on a "https://..." like URL, so than annoying security warning ("No seguro" in spanish) at the address bar would just go away.
Any idea of what's could be going wrong? Any more information needed?
Thanks a lot!
Leandro
EDIT 2:
My "/etc/hosts" file is like this:
127.0.0.1 localhost
127.0.1.1 leandro-Lenovo-B50-10
127.0.0.1 www.infoalquiler.com.ar
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters