1. The problem I’m having:
I am attempting to setup a very simple reverse proxy using the OPNSense Caddy plugin. I have followed the tutorial given by the author (which appears to be out of date) and I am getting errors from Let’s Encrypt. They are claiming that there are no valid A records found for the domain, however I have absolutely set them. I had a Debian based Caddy setup just fine before this, and had not gotten this error.
2. Error messages and/or full log output:
2024-08-07T07:01:15-04:00 Warning caddy "warn","ts":"2024-08-07T11:01:15Z","logger":"admin.api","msg":"exiting; byeee!! 👋"}
2024-08-07T07:01:15-04:00 Informational caddy "info","ts":"2024-08-07T11:01:15Z","logger":"admin.api","msg":"received request","method":"POST","host":"127.0.0.1","uri":"/stop","remote_ip":"","remote_port":"","headers":{"Accept-Encoding":["gzip"],"Content-Length":["0"],"User-Agent":["Go-http-client/1.1"]}}
2024-08-07T07:01:15-04:00 Informational caddy "info","ts":"2024-08-07T11:01:15Z","logger":"tls.cache.maintenance","msg":"stopped background certificate maintenance","cache":"0x87074cd00"}
2024-08-07T07:01:15-04:00 Informational caddy "info","ts":"2024-08-07T11:01:15Z","logger":"http.auto_https","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
2024-08-07T07:01:15-04:00 Informational caddy "info","ts":"2024-08-07T11:01:15Z","logger":"http.auto_https","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":443}
2024-08-07T07:01:15-04:00 Informational caddy "info","ts":"2024-08-07T11:01:15Z","logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0x87074cd00"}
2024-08-07T07:00:53-04:00 Informational caddy "info","ts":"2024-08-07T11:00:53Z","logger":"tls.issuance.acme.acme_client","msg":"trying to solve challenge","identifier":"liyue.dead-end.quest","challenge_type":"http-01","ca":"https://acme.zerossl.com/v2/DV90"}
2024-08-07T07:00:53-04:00 Informational caddy "info","ts":"2024-08-07T11:00:53Z","logger":"tls.issuance.acme","msg":"using ACME account","account_id":"https://acme.zerossl.com/v2/DV90/account/ONksIX_GOmcTHzY0RYJnAA","account_contact":["mailto:aidan@aidansmith.dev"]}
2024-08-07T07:00:53-04:00 Informational caddy "info","ts":"2024-08-07T11:00:53Z","logger":"tls.issuance.acme","msg":"done waiting on internal rate limiter","identifiers":["liyue.dead-end.quest"],"ca":"https://acme.zerossl.com/v2/DV90","account":"aidan@aidansmith.dev"}
2024-08-07T07:00:53-04:00 Informational caddy "info","ts":"2024-08-07T11:00:53Z","logger":"tls.issuance.acme","msg":"waiting on internal rate limiter","identifiers":["liyue.dead-end.quest"],"ca":"https://acme.zerossl.com/v2/DV90","account":"aidan@aidansmith.dev"}
2024-08-07T07:00:53-04:00 Error caddy "error","ts":"2024-08-07T11:00:53Z","logger":"tls.obtain","msg":"could not get certificate from issuer","identifier":"liyue.dead-end.quest","issuer":"acme-v02.api.letsencrypt.org-directory","error":"HTTP 400 urn:ietf:params:acme:error:dns - no valid A records found for liyue.dead-end.quest; no valid AAAA records found for liyue.dead-end.quest"}
2024-08-07T07:00:53-04:00 Error caddy "error","ts":"2024-08-07T11:00:53Z","logger":"tls.issuance.acme.acme_client","msg":"validating authorization","identifier":"liyue.dead-end.quest","problem":{"type":"urn:ietf:params:acme:error:dns","title":"","detail":"no valid A records found for liyue.dead-end.quest; no valid AAAA records found for liyue.dead-end.quest","instance":"","subproblems":[]},"order":"https://acme-v02.api.letsencrypt.org/acme/order/1878338416/294202344556","attempt":2,"max_attempts":3}
2024-08-07T07:00:53-04:00 Error caddy "error","ts":"2024-08-07T11:00:53Z","logger":"tls.issuance.acme.acme_client","msg":"challenge failed","identifier":"liyue.dead-end.quest","challenge_type":"http-01","problem":{"type":"urn:ietf:params:acme:error:dns","title":"","detail":"no valid A records found for liyue.dead-end.quest; no valid AAAA records found for liyue.dead-end.quest","instance":"","subproblems":[]}}
2024-08-07T07:00:52-04:00 Informational caddy "info","ts":"2024-08-07T11:00:52Z","logger":"tls.issuance.acme.acme_client","msg":"trying to solve challenge","identifier":"liyue.dead-end.quest","challenge_type":"http-01","ca":"https://acme-v02.api.letsencrypt.org/directory"}
2024-08-07T07:00:51-04:00 Error caddy "error","ts":"2024-08-07T11:00:51Z","logger":"tls.issuance.acme.acme_client","msg":"validating authorization","identifier":"liyue.dead-end.quest","problem":{"type":"urn:ietf:params:acme:error:dns","title":"","detail":"no valid A records found for liyue.dead-end.quest; no valid AAAA records found for liyue.dead-end.quest","instance":"","subproblems":[]},"order":"https://acme-v02.api.letsencrypt.org/acme/order/1878338416/294202339306","attempt":1,"max_attempts":3}
2024-08-07T07:00:51-04:00 Error caddy "error","ts":"2024-08-07T11:00:51Z","logger":"tls.issuance.acme.acme_client","msg":"challenge failed","identifier":"liyue.dead-end.quest","challenge_type":"tls-alpn-01","problem":{"type":"urn:ietf:params:acme:error:dns","title":"","detail":"no valid A records found for liyue.dead-end.quest; no valid AAAA records found for liyue.dead-end.quest","instance":"","subproblems":[]}}
2024-08-07T07:00:51-04:00 Informational caddy "info","ts":"2024-08-07T11:00:51Z","logger":"tls.issuance.acme.acme_client","msg":"trying to solve challenge","identifier":"liyue.dead-end.quest","challenge_type":"tls-alpn-01","ca":"https://acme-v02.api.letsencrypt.org/directory"}
2024-08-07T07:00:50-04:00 Informational caddy "info","ts":"2024-08-07T11:00:50Z","logger":"tls.issuance.acme","msg":"using ACME account","account_id":"https://acme-v02.api.letsencrypt.org/acme/acct/1878338416","account_contact":["mailto:aidan@aidansmith.dev"]}
3. Caddy version:
The version listed for the plugin is 1.6.0.
SSHing into the machine, the version is: v2.8.4 h1:q3pe0wpBj1OcHFZ3n/1nl4V4bxBrYoSoab7rL9BMYNk=
4. How I installed and ran Caddy:
a. System environment:
Caddy Plugin running on OPNSense 24.1.10_8
b. Command:
Not Applicable.
c. Service/unit/compose file:
Once again, I don’t think this is applicable.
d. My complete Caddy config:
# DO NOT EDIT THIS FILE -- OPNsense auto-generated file
# Global Options
{
log {
output net unixgram//var/caddy/var/run/log {}
format json {
time_format rfc3339
}
}
email aidan@aidansmith.dev
grace_period 10s
import /usr/local/etc/caddy/caddy.d/*.global
}
# Reverse Proxy Configuration
# Reverse Proxy Domain: "7e007152-316a-44c8-8b49-29320a987b86"
liyue.dead-end.quest {
handle {
reverse_proxy 192.168.1.3:8006 {
transport http {
tls_insecure_skip_verify
}
}
}
}
import /usr/local/etc/caddy/caddy.d/*.conf
Man, I had to save the spacing on that file, it was completely unreadable. The only difference between this and my personal is that there is an “https://” before the IP address, but that’s definitely not causing the problem here.