Coder Social home page Coder Social logo

flippingbinary / lets-encrypt-tlsa Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 5.0 31 KB

Let's Encrypt encourages the use of certbot to automate certificate renewal, but that tool generates a new CSR every time. That makes DANE with TLSA difficult, so this set of scripts automates the renewal of consistent CSRs with certbot so systems administrators can choose when to generate a new CSR and update their DNS records in anticipation.

Home Page: https://flippingbinary.com

License: MIT License

Shell 100.00%
certbot letsencrypt certbot-ssl tlsa dane letsencrypt-utils letsencrypt-certificates lets-encrypt certbot-client

lets-encrypt-tlsa's Introduction

lets-encrypt-tlsa

Read the article about this script on the Flipping Binary website.

Contributors wanted

I've noticed an uptick in interest recently, but my time is devoted to other projects at the moment. If you make improvements that you want to share, please submit a pull request. I will probably approve it as long as it doesn't break anything and provides some sort of improvement.

Installation

Modify these steps and the scripts as necessary for your distribution. The steps have been tested only on Ubuntu 16.04 servers.

  1. Change ownership and permissions of the script files
  $ sudo chown root:root letsencrypt-*
  $ sudo chmod +x letsencrypt-*
  1. Change the settings in letsencrypt-tlsa file, especially the EMAIL setting!
  $ sudo nano letsencrypt-tlsa
  1. Move the letsencrypt-tlsa file to /etc/default so it is accessible by the other scripts and easy to edit.
  $ sudo mv letsencrypt-tlsa /etc/default
  1. Move letsencrypt-autorun to /etc/cron.weekly
  $ sudo mv letsencrypt-autorun /etc/cron.weekly
  1. Move the rest to /usr/local/sbin
  $ sudo mv letsencrypt-* /usr/local/bin

Usage

  1. Generate a key pair and Certificate Signing Request (CSR). This script does not limit the number of domain names, but attempting to generate one certificate for dozens of domains at a time might fail. The first listed domain is primary and needs to be listed first for each command in this set of tools. Using example.com and www.example.com as an example:
  $ sudo letsencrypt-generate example.com www.example.com
  1. Request a signature from Let's Encrypt. Using example.com and www.example.com as an example both of these commands do the same thing (note the primary domain is listed first and is the only one that matters):
  $ sudo letsencrypt-request example.com
  $ sudo letsencrypt-request example.com www.example.com
  1. Check the hash of the signed certificate. You can list secondary domains along with the primary domain, but the hash will be the same for each. The important part includes and follows the 3 1 1 which makes up your TLSA record. Using example.com and www.example.com as an example:
  $ sudo letsencrypt-hash example.com www.example.com
  1. Publish the TLSA records with your DNS provider.

  2. Install the new certificates. This command will create a symlink in a consistent location (defaulting to /etc/ssl/letsencrypt/live/<domainname>) to the latest signed certificate for the primary domain. Using example.com and www.example.com as an example, both of these commands do the same thing (note the primary domain is listed first and is the only one that matters):

  $ sudo letsencrypt-install example.com
  $ sudo letsencrypt-install example.com www.example.com

lets-encrypt-tlsa's People

Contributors

flippingbinary avatar luukasahola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.