LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-02-2017, 06:37 PM   #1
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
Any recent "LetsEncrypt war-stories? Advice? Best practices?"


After receiving a "rude awakening" from the former SSL vendor that covers a combined site which has about 75 different URL store-fronts, I need to fairly-abruptly shift the whole thing over to LetsEncrypt.

The sites run from a single set of software running on a cloud server cluster, and I will need to reliably implement a process that can obtain and then renew the certificates for all of them automatically.

A slight twist is that the sites do not yet run on their "final" IP-address, although I do control both old and new.

Actively soliciting any input – especially, links to really good web sites / blogs – to make my hasty-path here as smooth and quick(!) as possible.

(I have already vacuumed previous posts here on LQ ... thankye ... and all of the links contained therein.)
 
Old 02-03-2017, 04:05 PM   #2
TheLinuxJedi
LQ Newbie
 
Registered: Feb 2017
Location: Norfolk, UK
Distribution: Fedora
Posts: 9

Rep: Reputation: Disabled
I worked with the people behind Let's Encrypt a little bit whilst I was at NGINX. I use it on several websites I manage. It is very easy to use and manage, I highly recommend it. NGINX have a blog post on it:

https://www.nginx.com/blog/free-cert...ypt-and-nginx/

As for your cert distribution problem, there is no automated way of doing it I'm aware of, I recommend using cron or similar to rsync the certs when it renews. There are people that have done this as you can see here:

https://community.letsencrypt.org/t/...-servers/16449

This would be much easier to solve with a load balancer in front of the cluster rather than relying on the client to use DNS and having that do the SSL termination.

Hope this helps.
 
Old 02-04-2017, 06:08 AM   #3
thirdbird
LQ Newbie
 
Registered: Feb 2017
Distribution: Debian
Posts: 20

Rep: Reputation: Disabled
I just read their story about Comodo trying to register/patent their brand name. Makes me feel almost guilty for using Comodo myself, it was the best priced DV I found before I knew LE is now a CA. I hope it's no real threat to them, and was good to know they're able to lawyer up.
 
Old 02-05-2017, 04:16 AM   #4
TheLinuxJedi
LQ Newbie
 
Registered: Feb 2017
Location: Norfolk, UK
Distribution: Fedora
Posts: 9

Rep: Reputation: Disabled
I think there are too big many companies (with really good lawyers) invested in it for Comodo to do any damage. Don't feel guilty about it, some of the best tech companies have done similar things in the past to try and stifle competition.

There is a quote that is often misattributed to Gandhi which applies a lot in the tech world (and probably other industries):

"First they ignore you, then they laugh at you, then they fight you, then you win"
 
Old 02-05-2017, 12:25 PM   #5
thirdbird
LQ Newbie
 
Registered: Feb 2017
Distribution: Debian
Posts: 20

Rep: Reputation: Disabled
Swapped out my existing Comodo with LE certificates today for 3 domains in a apache/vhost setup to try it out. Was very smooth. Used certonly with webroot parameters as I didn't want it messing around in my existing config blindly. Whole job took 5mins. Automatic renewal is basically just a 'certbot renew' put into a cron.monthly script which intervals it safely within the 90 day period. As long as the vhosts keep pointing to the same /etc/letsencrypt/live/* locations, it's all good.

For me the main gain is being able to sort more stuff into subdomains now. Wildcards (even DV) are annoyingly expensive.

Last edited by thirdbird; 02-05-2017 at 12:26 PM.
 
Old 02-06-2017, 03:41 AM   #6
gradinaruvasile
Member
 
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 731

Rep: Reputation: 158Reputation: 158
I had StartSSL certificates that upon renewal this January gave me certificates valid until 2020. Only problem was after a few days Chrome started complaining that the certificate cannot be validated...
So started to use LetsEncrypt - i use nginx BTW.
Now certbot is very easy to use, there are 2 scenarios:

NOTE that port 80/http is used, NOT 443 for verifications.

1. webroot module: - you make sure anyone from outside can access http://domain/.well-known/ directory and launch certbot with root rights - it will populate the directory with some token received from letsencrypt site and subsequently verify that independently from outside
2. standard mode - make sure port 80 is NOT used by your web server, launch certbot that will launch an internal web server on that port temporarily, verify from outside. This does not need to change anything on your web server's config (but if you have a production server using http this is not practical).
 
Old 02-06-2017, 04:10 AM   #7
thirdbird
LQ Newbie
 
Registered: Feb 2017
Distribution: Debian
Posts: 20

Rep: Reputation: Disabled
Quote:
Originally Posted by gradinaruvasile View Post
NOTE that port 80/http is used, NOT 443 for verifications....
That must be incorrect for existing and functional SSL vhosts - it works fine with those, I had a SSL-only host running on comodo DV that was no problem. But For new vhosts that needs SSL for the first time, this is correct. After generating the first certificate and making sure it works, you can then forward http to https, or deactivate http vhost entirely and also certbot renew will work fine. I tested this explicitly yesterday. Albeit with certonly and webroot with apache2, have never used the apache module or nginx.
 
Old 02-06-2017, 04:39 AM   #8
gradinaruvasile
Member
 
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 731

Rep: Reputation: 158Reputation: 158
For me only on port 80 worked. I had nginx running only on https and it could not get it to work, it was complaining that it could not connect until i enabled port 80 too. After that it worked.
I used the webroot plugin then. After that i stopped nginx on port 80 and tried the standalone which worked.
 
Old 02-06-2017, 05:37 AM   #9
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Using webroot and a script that runs weekly to check and update certs for a box that has multiple sites on it.

Code:
#!/bin/bash

while read DOMAINPAIR ; do
  DOMAIN=$(echo ${DOMAINPAIR} | awk {'print $1'})
  FOLDER=$(echo ${DOMAINPAIR} | awk {'print $2'})
  echo "$(date) Starting ${DOMAIN} ${FOLDER}"
  /bin/certbot certonly --webroot -w ${FOLDER} -d ${DOMAIN} -d www.${DOMAIN}
done << EOLIST
example.com /home/sites/example.com/public_html
domain2.com /home/sites/domain2.com/public_html
onemore.com /home/sites/onemore/public_html
EOLIST

/sbin/apachectl graceful
 
Old 02-06-2017, 06:27 AM   #10
thirdbird
LQ Newbie
 
Registered: Feb 2017
Distribution: Debian
Posts: 20

Rep: Reputation: Disabled
Is running custom certonly/webroot commands for renewal preferable over just monthly cron'ing certbot renew ?

Certbot user guide:
Quote:
This will attempt to renew any previously-obtained certificates that expire in less than 30 days. The same plugin and options that were used at the time the certificate was originally issued will be used for the renewal attempt, unless you specify other plugins or options.
Haven't had need for renewal yet, but my theory was that it won't mess with configuration, just update the certificates since they are already installed.
 
Old 02-06-2017, 06:32 AM   #11
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Quote:
Originally Posted by thirdbird View Post
Is running custom certonly/webroot commands for renewal preferable over just monthly cron'ing certbot renew ?
My script has been working fine for me
 
Old 02-06-2017, 08:39 AM   #12
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
Quote:
Originally Posted by gradinaruvasile View Post
NOTE that port 80/http is used, NOT 443 for verifications.
I cannot confirm that. I only have port 443 forwarded to my webserver and creating and renewing the certificate works.
 
Old 02-07-2017, 07:39 AM   #13
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659

Original Poster
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
Does their "bot" attempt to update Apache configuration files?
 
Old 02-07-2017, 07:47 AM   #14
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Quote:
Originally Posted by sundialsvcs View Post
Does their "bot" attempt to update Apache configuration files?
From memory it certainly didn't on mine. I always used "certonly" and it downloads the certs, it was up to me to create the config files.
 
Old 02-07-2017, 07:50 AM   #15
thirdbird
LQ Newbie
 
Registered: Feb 2017
Distribution: Debian
Posts: 20

Rep: Reputation: Disabled
Quote:
Originally Posted by sundialsvcs View Post
Does their "bot" attempt to update Apache configuration files?
The apache module does, if you use --apache. Even used together with certonly, it will make temporary changes and undo them at the end - including a temporary vhost for authentication. Use webroot to stay away from configuration files. Check out their documentation, it's pretty good.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
seeking "best practices" for personal/professional eMail management SaintDanBert Linux - Software 14 12-14-2019 05:19 AM
"Certifications" in context: "friendly, yet battle-won, advice." sundialsvcs General 1 11-24-2014 08:39 AM
seeking "home office" or "small business" server advice SaintDanBert Linux - Server 10 05-04-2014 05:12 PM
Pengy practices the martial art of "GNU" foo caleb star Linux - Hardware 2 01-28-2004 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration