Notes
  • Introduction
  • 應用程式
    • Azure
      • Logic App
      • web app
    • Android
    • Bower
    • Curl
    • DNS
    • Docker
    • Fail2ban
    • Git
    • GitLab-CI
    • GitLab
    • GPG
    • Home Assistant
    • IIS
    • Line Bot
    • Ngrok
    • Npm
    • PowerShell
    • Redis
    • SSH
    • Synology
    • VS Code
    • Web
  • 程式語言
    • C#
      • 遠端偵錯-Remote Debugger
      • 預設值表
      • .Net Core
    • JavaScript
    • PowerShell
  • 作業系統
    • Mac OS
    • Windows 10
    • Raspberry Pi
    • Ubuntu
  • 其他
    • SSL
    • Tools
Powered by GitBook
On this page
  • 安全性測試
  • LetsEncrypt
  • create a credentials in ~/.secrets/certbot/cloudflare.ini
  • install plugins
  • chmod
  • run command
  • renew
  • set crontab
  • docker Run
  • pem to pfx
  • testssl
Edit on Git
  1. 其他

SSL

安全性測試

  • ssl labs

  • cloudflare ssl-test

  • testssl

LetsEncrypt

create a credentials in ~/.secrets/certbot/cloudflare.ini

# Cloudflare API credentials used by Certbot
dns_cloudflare_email = <your mail>
dns_cloudflare_api_key = <your apiKey>

install plugins

certbot -i certbot-dns-cloudflare

or

pip3 install certbot-dns-cloudflare

chmod

chmod 700 ~/.secrets/certbot/cloudflare.ini

run command

certbot certonly --dns-cloudflare --dns-cloudflare-credentials ~/.secrets/certbot/cloudflare.ini -d dns.weiting.me

renew

certbot renew --quiet

set crontab

# 每兩個月的1號執行
0 0 1 */2 * certbot renew --quiet

docker Run

docker run -it \
-v ~/letsencrypt/:/etc/letsencrypt \
-v ~/.secrets/certbot/cloudflare.ini:/tmp/certbot/cloudflare.ini \
certbot/dns-cloudflare  certonly \
--dns-cloudflare \
--dns-cloudflare-credentials /tmp/certbot/cloudflare.ini \
-d <your domain> \
-m <your mail>

pem to pfx

openssl pkcs12 -in cert.pem -inkey privkey.pem -export -out server.pfx

testssl

docker run -it --rm --init drwetter/testssl.sh url

Previous其他NextTools

Last updated 2 years ago