diff --git a/docs/content/dns/zz_gen_rfc2136.md b/docs/content/dns/zz_gen_rfc2136.md index 954c21ae..e0ef749b 100644 --- a/docs/content/dns/zz_gen_rfc2136.md +++ b/docs/content/dns/zz_gen_rfc2136.md @@ -18,9 +18,25 @@ Configuration for [RFC2136](https://tools.ietf.org/html/rfc2136). - Code: `rfc2136` -{{% notice note %}} -_Please contribute by adding a CLI example._ -{{% /notice %}} +Here is an example bash command using the RFC2136 provider: + +```bash +RFC2136_NAMESERVER=127.0.0.1 \ +RFC2136_TSIG_KEY=lego \ +RFC2136_TSIG_ALGORITHM=hmac-sha256. \ +RFC2136_TSIG_SECRET=YWJjZGVmZGdoaWprbG1ub3BxcnN0dXZ3eHl6MTIzNDU= \ +lego --email myemail@example.com --dns rfc2136 --domains my.example.org run + +## --- + +keyname=lego; keyfile=lego.key; tsig-keygen $keyname > $keyfile + +RFC2136_NAMESERVER=127.0.0.1 \ +RFC2136_TSIG_KEY="$keyname" \ +RFC2136_TSIG_ALGORITHM="$( awk -F'[ ";]' '/algorithm/ { print $2 }' $keyfile )." \ +RFC2136_TSIG_SECRET="$( awk -F'[ ";]' '/secret/ { print $3 }' $keyfile )" \ +lego --email myemail@example.com --dns rfc2136 --domains my.example.org run +``` diff --git a/providers/dns/rfc2136/rfc2136.toml b/providers/dns/rfc2136/rfc2136.toml index 020a0968..eed21430 100644 --- a/providers/dns/rfc2136/rfc2136.toml +++ b/providers/dns/rfc2136/rfc2136.toml @@ -4,7 +4,23 @@ URL = "https://tools.ietf.org/html/rfc2136" Code = "rfc2136" Since = "v0.3.0" -Example = '''''' +Example = ''' +RFC2136_NAMESERVER=127.0.0.1 \ +RFC2136_TSIG_KEY=lego \ +RFC2136_TSIG_ALGORITHM=hmac-sha256. \ +RFC2136_TSIG_SECRET=YWJjZGVmZGdoaWprbG1ub3BxcnN0dXZ3eHl6MTIzNDU= \ +lego --email myemail@example.com --dns rfc2136 --domains my.example.org run + +## --- + +keyname=lego; keyfile=lego.key; tsig-keygen $keyname > $keyfile + +RFC2136_NAMESERVER=127.0.0.1 \ +RFC2136_TSIG_KEY="$keyname" \ +RFC2136_TSIG_ALGORITHM="$( awk -F'[ ";]' '/algorithm/ { print $2 }' $keyfile )." \ +RFC2136_TSIG_SECRET="$( awk -F'[ ";]' '/secret/ { print $3 }' $keyfile )" \ +lego --email myemail@example.com --dns rfc2136 --domains my.example.org run +''' [Configuration] [Configuration.Credentials]