Compare commits

...

9 Commits

Author SHA1 Message Date
LinuxServer-CI
ed3402fe51 Bot Updating Package Versions 2021-10-14 07:18:03 +02:00
LinuxServer-CI
f63303b610 Bot Updating Package Versions 2021-10-12 17:18:33 +02:00
aptalca
9953568f06 Merge pull request #166 from linuxserver/rootstaging
fix old root detection (staging and acme server)
2021-10-12 11:06:00 -04:00
aptalca
915f209ea5 fix old root detection (staging and acme server) 2021-10-12 10:04:57 -04:00
aptalca
3ff891f75d Merge pull request #164 from obsidiangroup/master
Added support for Hurricane Electric (HE) DNS validation
2021-10-06 16:11:45 -04:00
aptalca
e9bea31a3f update readme 2021-10-06 15:39:36 -04:00
aptalca
09dff4ff5e consolidate dns plugins, add lxml deps 2021-10-06 15:08:00 -04:00
obsidiangroup
0ffa850cdc Fixed HE DNS validation.
Fixed HE DNS validation to adhere to certbot/certbot PR#8131 (https://github.com/certbot/certbot/pull/8131)
2021-10-06 13:41:58 -04:00
obsidiangroup
aa9990b496 Added support for Hurricane Electric (HE) DNS validation
Adds support for Hurricane Electric's Free DNS Service validation.
2021-10-05 19:23:25 -04:00
8 changed files with 26 additions and 8 deletions

View File

@@ -18,6 +18,8 @@ RUN \
g++ \ g++ \
gcc \ gcc \
libffi-dev \ libffi-dev \
libxml2-dev \
libxslt-dev \
openssl-dev \ openssl-dev \
python3-dev && \ python3-dev && \
echo "**** install runtime packages ****" && \ echo "**** install runtime packages ****" && \
@@ -108,6 +110,7 @@ RUN \
certbot-dns-dnsmadeeasy \ certbot-dns-dnsmadeeasy \
certbot-dns-domeneshop \ certbot-dns-domeneshop \
certbot-dns-google \ certbot-dns-google \
certbot-dns-he \
certbot-dns-hetzner \ certbot-dns-hetzner \
certbot-dns-inwx \ certbot-dns-inwx \
certbot-dns-ionos \ certbot-dns-ionos \

View File

@@ -18,6 +18,8 @@ RUN \
g++ \ g++ \
gcc \ gcc \
libffi-dev \ libffi-dev \
libxml2-dev \
libxslt-dev \
openssl-dev \ openssl-dev \
python3-dev && \ python3-dev && \
echo "**** install runtime packages ****" && \ echo "**** install runtime packages ****" && \
@@ -108,6 +110,7 @@ RUN \
certbot-dns-dnsmadeeasy \ certbot-dns-dnsmadeeasy \
certbot-dns-domeneshop \ certbot-dns-domeneshop \
certbot-dns-google \ certbot-dns-google \
certbot-dns-he \
certbot-dns-hetzner \ certbot-dns-hetzner \
certbot-dns-inwx \ certbot-dns-inwx \
certbot-dns-ionos \ certbot-dns-ionos \

View File

@@ -18,6 +18,8 @@ RUN \
g++ \ g++ \
gcc \ gcc \
libffi-dev \ libffi-dev \
libxml2-dev \
libxslt-dev \
openssl-dev \ openssl-dev \
python3-dev && \ python3-dev && \
echo "**** install runtime packages ****" && \ echo "**** install runtime packages ****" && \
@@ -108,6 +110,7 @@ RUN \
certbot-dns-dnsmadeeasy \ certbot-dns-dnsmadeeasy \
certbot-dns-domeneshop \ certbot-dns-domeneshop \
certbot-dns-google \ certbot-dns-google \
certbot-dns-he \
certbot-dns-hetzner \ certbot-dns-hetzner \
certbot-dns-inwx \ certbot-dns-inwx \
certbot-dns-ionos \ certbot-dns-ionos \

View File

@@ -213,7 +213,7 @@ Container images are configured using parameters passed at runtime (such as thos
| `-e VALIDATION=http` | Certbot validation method to use, options are `http`, `dns` or `duckdns` (`dns` method also requires `DNSPLUGIN` variable set) (`duckdns` method requires `DUCKDNSTOKEN` variable set, and the `SUBDOMAINS` variable must be either empty or set to `wildcard`). | | `-e VALIDATION=http` | Certbot validation method to use, options are `http`, `dns` or `duckdns` (`dns` method also requires `DNSPLUGIN` variable set) (`duckdns` method requires `DUCKDNSTOKEN` variable set, and the `SUBDOMAINS` variable must be either empty or set to `wildcard`). |
| `-e SUBDOMAINS=www,` | Subdomains you'd like the cert to cover (comma separated, no spaces) ie. `www,ftp,cloud`. For a wildcard cert, set this _exactly_ to `wildcard` (wildcard cert is available via `dns` and `duckdns` validation only) | | `-e SUBDOMAINS=www,` | Subdomains you'd like the cert to cover (comma separated, no spaces) ie. `www,ftp,cloud`. For a wildcard cert, set this _exactly_ to `wildcard` (wildcard cert is available via `dns` and `duckdns` validation only) |
| `-e CERTPROVIDER=` | Optionally define the cert provider. Set to `zerossl` for ZeroSSL certs (requires existing [ZeroSSL account](https://app.zerossl.com/signup) and the e-mail address entered in `EMAIL` env var). Otherwise defaults to Let's Encrypt. | | `-e CERTPROVIDER=` | Optionally define the cert provider. Set to `zerossl` for ZeroSSL certs (requires existing [ZeroSSL account](https://app.zerossl.com/signup) and the e-mail address entered in `EMAIL` env var). Otherwise defaults to Let's Encrypt. |
| `-e DNSPLUGIN=cloudflare` | Required if `VALIDATION` is set to `dns`. Options are `aliyun`, `cloudflare`, `cloudxns`, `cpanel`, `digitalocean`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `gehirn`, `google`, `hetzner`, `inwx`, `ionos`, `linode`, `luadns`, `netcup`, `njalla`, `nsone`, `ovh`, `rfc2136`, `route53`, `sakuracloud`, `transip` and `vultr`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`. | | `-e DNSPLUGIN=cloudflare` | Required if `VALIDATION` is set to `dns`. Options are `aliyun`, `cloudflare`, `cloudxns`, `cpanel`, `digitalocean`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `gehirn`, `google`, `he`, `hetzner`, `inwx`, `ionos`, `linode`, `luadns`, `netcup`, `njalla`, `nsone`, `ovh`, `rfc2136`, `route53`, `sakuracloud`, `transip` and `vultr`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`. |
| `-e PROPAGATION=` | Optionally override (in seconds) the default propagation time for the dns plugins. | | `-e PROPAGATION=` | Optionally override (in seconds) the default propagation time for the dns plugins. |
| `-e DUCKDNSTOKEN=` | Required if `VALIDATION` is set to `duckdns`. Retrieve your token from https://www.duckdns.org | | `-e DUCKDNSTOKEN=` | Required if `VALIDATION` is set to `duckdns`. Retrieve your token from https://www.duckdns.org |
| `-e EMAIL=` | Optional e-mail address used for cert expiration notifications (Required for ZeroSSL). | | `-e EMAIL=` | Optional e-mail address used for cert expiration notifications (Required for ZeroSSL). |
@@ -332,6 +332,8 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions ## Versions
* **12.10.21:** - Fix deprecated LE root cert check to fix failures when using `STAGING=true`, and failures in revoking.
* **06.10.21:** - Added support for Hurricane Electric (HE) DNS validation. Added lxml build deps.
* **01.10.21:** - Check if the cert uses the old LE root cert, revoke and regenerate if necessary. [Here's more info](https://twitter.com/letsencrypt/status/1443621997288767491) on LE root cert expiration * **01.10.21:** - Check if the cert uses the old LE root cert, revoke and regenerate if necessary. [Here's more info](https://twitter.com/letsencrypt/status/1443621997288767491) on LE root cert expiration
* **19.09.21:** - Add an optional header to opt out of Google FLoC in `ssl.conf`. * **19.09.21:** - Add an optional header to opt out of Google FLoC in `ssl.conf`.
* **17.09.21:** - Mark `SUBDOMAINS` var as optional. * **17.09.21:** - Mark `SUBDOMAINS` var as optional.

View File

@@ -1,6 +1,6 @@
alpine-baselayout-3.2.0-r16 alpine-baselayout-3.2.0-r16
alpine-keys-2.3-r1 alpine-keys-2.3-r1
apache2-utils-2.4.49-r0 apache2-utils-2.4.50-r0
apk-tools-2.12.7-r0 apk-tools-2.12.7-r0
apr-1.7.0-r0 apr-1.7.0-r0
apr-util-1.6.1-r7 apr-util-1.6.1-r7
@@ -154,8 +154,8 @@ php7-pdo_odbc-7.4.24-r0
php7-pdo_pgsql-7.4.24-r0 php7-pdo_pgsql-7.4.24-r0
php7-pdo_sqlite-7.4.24-r0 php7-pdo_sqlite-7.4.24-r0
php7-pear-7.4.24-r0 php7-pear-7.4.24-r0
php7-pecl-apcu-5.1.20-r0 php7-pecl-apcu-5.1.21-r0
php7-pecl-igbinary-3.2.4-r0 php7-pecl-igbinary-3.2.6-r0
php7-pecl-mailparse-3.1.1-r1 php7-pecl-mailparse-3.1.1-r1
php7-pecl-mcrypt-1.0.4-r0 php7-pecl-mcrypt-1.0.4-r0
php7-pecl-memcached-3.1.5-r2 php7-pecl-memcached-3.1.5-r2
@@ -217,7 +217,7 @@ shadow-4.8.1-r0
skalibs-2.10.0.3-r0 skalibs-2.10.0.3-r0
sqlite-libs-3.35.5-r0 sqlite-libs-3.35.5-r0
ssl_client-1.33.1-r3 ssl_client-1.33.1-r3
tzdata-2021b-r0 tzdata-2021c-r0
unixodbc-2.3.9-r1 unixodbc-2.3.9-r1
utmps-0.1.0.2-r0 utmps-0.1.0.2-r0
whois-5.5.10-r0 whois-5.5.10-r0

View File

@@ -51,7 +51,7 @@ opt_param_usage_include_env: true
opt_param_env_vars: opt_param_env_vars:
- { env_var: "SUBDOMAINS", env_value: "www,", desc: "Subdomains you'd like the cert to cover (comma separated, no spaces) ie. `www,ftp,cloud`. For a wildcard cert, set this _exactly_ to `wildcard` (wildcard cert is available via `dns` and `duckdns` validation only)" } - { env_var: "SUBDOMAINS", env_value: "www,", desc: "Subdomains you'd like the cert to cover (comma separated, no spaces) ie. `www,ftp,cloud`. For a wildcard cert, set this _exactly_ to `wildcard` (wildcard cert is available via `dns` and `duckdns` validation only)" }
- { env_var: "CERTPROVIDER", env_value: "", desc: "Optionally define the cert provider. Set to `zerossl` for ZeroSSL certs (requires existing [ZeroSSL account](https://app.zerossl.com/signup) and the e-mail address entered in `EMAIL` env var). Otherwise defaults to Let's Encrypt." } - { env_var: "CERTPROVIDER", env_value: "", desc: "Optionally define the cert provider. Set to `zerossl` for ZeroSSL certs (requires existing [ZeroSSL account](https://app.zerossl.com/signup) and the e-mail address entered in `EMAIL` env var). Otherwise defaults to Let's Encrypt." }
- { env_var: "DNSPLUGIN", env_value: "cloudflare", desc: "Required if `VALIDATION` is set to `dns`. Options are `aliyun`, `cloudflare`, `cloudxns`, `cpanel`, `digitalocean`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `gehirn`, `google`, `hetzner`, `inwx`, `ionos`, `linode`, `luadns`, `netcup`, `njalla`, `nsone`, `ovh`, `rfc2136`, `route53`, `sakuracloud`, `transip` and `vultr`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`." } - { env_var: "DNSPLUGIN", env_value: "cloudflare", desc: "Required if `VALIDATION` is set to `dns`. Options are `aliyun`, `cloudflare`, `cloudxns`, `cpanel`, `digitalocean`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `gehirn`, `google`, `he`, `hetzner`, `inwx`, `ionos`, `linode`, `luadns`, `netcup`, `njalla`, `nsone`, `ovh`, `rfc2136`, `route53`, `sakuracloud`, `transip` and `vultr`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`." }
- { env_var: "PROPAGATION", env_value: "", desc: "Optionally override (in seconds) the default propagation time for the dns plugins." } - { env_var: "PROPAGATION", env_value: "", desc: "Optionally override (in seconds) the default propagation time for the dns plugins." }
- { env_var: "DUCKDNSTOKEN", env_value: "", desc: "Required if `VALIDATION` is set to `duckdns`. Retrieve your token from https://www.duckdns.org" } - { env_var: "DUCKDNSTOKEN", env_value: "", desc: "Required if `VALIDATION` is set to `duckdns`. Retrieve your token from https://www.duckdns.org" }
- { env_var: "EMAIL", env_value: "", desc: "Optional e-mail address used for cert expiration notifications (Required for ZeroSSL)." } - { env_var: "EMAIL", env_value: "", desc: "Optional e-mail address used for cert expiration notifications (Required for ZeroSSL)." }
@@ -155,6 +155,8 @@ app_setup_nginx_reverse_proxy_block: ""
# changelog # changelog
changelogs: changelogs:
- { date: "12.10.21:", desc: "Fix deprecated LE root cert check to fix failures when using `STAGING=true`, and failures in revoking." }
- { date: "06.10.21:", desc: "Added support for Hurricane Electric (HE) DNS validation. Added lxml build deps." }
- { date: "01.10.21:", desc: "Check if the cert uses the old LE root cert, revoke and regenerate if necessary. [Here's more info](https://twitter.com/letsencrypt/status/1443621997288767491) on LE root cert expiration" } - { date: "01.10.21:", desc: "Check if the cert uses the old LE root cert, revoke and regenerate if necessary. [Here's more info](https://twitter.com/letsencrypt/status/1443621997288767491) on LE root cert expiration" }
- { date: "19.09.21:", desc: "Add an optional header to opt out of Google FLoC in `ssl.conf`." } - { date: "19.09.21:", desc: "Add an optional header to opt out of Google FLoC in `ssl.conf`." }
- { date: "17.09.21:", desc: "Mark `SUBDOMAINS` var as optional." } - { date: "17.09.21:", desc: "Mark `SUBDOMAINS` var as optional." }

View File

@@ -0,0 +1,4 @@
# Instructions: https://github.com/TSaaristo/certbot-dns-he#example-usage
# Replace with your values
dns_he_user = Me
dns_he_pass = my HE password

View File

@@ -236,7 +236,7 @@ if [ "$VALIDATION" = "dns" ]; then
elif [[ "$DNSPLUGIN" =~ ^(google)$ ]]; then elif [[ "$DNSPLUGIN" =~ ^(google)$ ]]; then
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
PREFCHAL="--dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.json ${PROPAGATIONPARAM}" PREFCHAL="--dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.json ${PROPAGATIONPARAM}"
elif [[ "$DNSPLUGIN" =~ ^(aliyun|domeneshop|hetzner|inwx|ionos|netcup|njalla|transip|vultr)$ ]]; then elif [[ "$DNSPLUGIN" =~ ^(aliyun|domeneshop|he|hetzner|inwx|ionos|netcup|njalla|transip|vultr)$ ]]; then
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
PREFCHAL="-a dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM}" PREFCHAL="-a dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM}"
elif [[ "$DNSPLUGIN" =~ ^(directadmin)$ ]]; then elif [[ "$DNSPLUGIN" =~ ^(directadmin)$ ]]; then
@@ -313,8 +313,9 @@ else
fi fi
# Check if the cert is using the old LE root cert, revoke and regen if necessary # Check if the cert is using the old LE root cert, revoke and regen if necessary
if [ -f "/config/keys/letsencrypt/chain.pem" ] && ([ "${CERTPROVIDER}" == "letsencrypt" ] || [ "${CERTPROVIDER}" == "" ]) && ! openssl x509 -in /config/keys/letsencrypt/chain.pem -noout -issuer | grep -q "ISRG Root X"; then if [ -f "/config/keys/letsencrypt/chain.pem" ] && ([ "${CERTPROVIDER}" == "letsencrypt" ] || [ "${CERTPROVIDER}" == "" ]) && [ "${STAGING}" != "true" ] && ! openssl x509 -in /config/keys/letsencrypt/chain.pem -noout -issuer | grep -q "ISRG Root X"; then
echo "The cert seems to be using the old LE root cert, which is no longer valid. Deleting and revoking." echo "The cert seems to be using the old LE root cert, which is no longer valid. Deleting and revoking."
REV_ACMESERVER="https://acme-v02.api.letsencrypt.org/directory"
certbot revoke --non-interactive --cert-path /config/etc/letsencrypt/live/"$ORIGDOMAIN"/fullchain.pem --server $REV_ACMESERVER certbot revoke --non-interactive --cert-path /config/etc/letsencrypt/live/"$ORIGDOMAIN"/fullchain.pem --server $REV_ACMESERVER
rm -rf /config/etc/letsencrypt rm -rf /config/etc/letsencrypt
mkdir -p /config/etc/letsencrypt mkdir -p /config/etc/letsencrypt