r/programming • • Nov 24 '16

Let's Encrypt Everything

https://blog.codinghorror.com/lets-encrypt-everything/
3.5k Upvotes

508 comments sorted by

View all comments

-4

u/Dave3of5 Nov 24 '16

And yet his blog uses cloudflare SSL rather than let encrypt. Still SSL though !

8

u/terrarum Nov 24 '16

Cloudflare is a CDN and they provide SSL between their servers and the client for free. I think you can provide your own certificate to them? If so, you could possibly generate a LetsEncrypt cert and upload it to them, but I don't think there's much reason for the average person to do that.

Where LetsEncrypt comes in is when securing the connection between the origin server and Cloudflare. Cloudflare mirrors your site, so they need to connect to your server to get files they don't have. That connection can be open if you want, or you can install a cert on your origin server so that that connection is over https. LetsEncrypt is a really simple way to get a free cert for your origin server.

-1

u/Dave3of5 Nov 24 '16 edited Nov 24 '16

I know what cloudflare (I use it myself) is you don't have to use their SSL.

You don't need to use cloudflare SSL, in fact if you are using cloudflare and LetEncrypt on the origin server it would be slightly odd as you are adding extra latency to every call. I better way would be use the cloudflare DNS as is and have the origin server take care of the SSL.

Edit: Why do you think I'm dissing LetEncrypt?

3

u/pfg1 Nov 24 '16

If you want to use Cloudflare and support https, you're going to need to use their SSL. You can certainly provide your own certificate and private key, but they'll have access to that and terminate SSL on their servers. As for the communication between Cloudflare and your origin servers, you'd need a certificate for that too (either a regular trusted certificate, or one from their internal Origin CA).

If you're letting your "origin server take care of SSL", then that's not really an origin server, it's just your web server, and you're using Cloudflare as a DNS provider only. They won't do any WAF/DDoS filtering, etc. in that scenario. (Not that everyone necessarily wants or needs that! Just to define what people typically mean when they say "site X uses Cloudflare".)

-1

u/Dave3of5 Nov 24 '16

Thanks I know all this ...

They will still do DDoS filtering even with DNS only. It just different from that page that they display.

Cloudflare started as a fast DNS service that had good DDoS filtering built in I guess people forget that.

3

u/pfg1 Nov 24 '16

They'll prevent DDoS attacks on the DNS layer (i.e. taking down your domains DNS server), but they won't stop anyone from taking down your site via volume or layer 7 based DDoS attacks. That's not possible once an attacker has the actual IP of your origin servers (which they have in this scenario). That's not a practical DDoS mitigation strategy.

-1

u/Dave3of5 Nov 24 '16

And I'm agreeing with you here. Why are you arguing against this? I said you get limited DDoS i.e. against your DNS but if you want more then sure you can use the cloudflare WAF stuff ... etc

That's not a practical DDoS mitigation strategy.

Not sure there is any practical DDoS mitigation strategy for most. Every large scale DDoS has taken the target offline even with cloudflare. Hiding your servers IP behind cloudflare also doesn't work anymore: http://www.crimeflare.com/cfs.html

2

u/pfg1 Nov 24 '16

I'm not arguing against anything, but "They will still do DDoS filtering even with DNS only [...]" leaves me with the impression that I'm safe from most DDoS attacks even if I just use their DNS, when in fact that will only prevent one specific type of DDoS while doing nothing against the most common DDoS vectors.

Similarly, the other post in which you mentioned that it would be better to terminate SSL on the origin server (which isn't really an origin server anymore) didn't mention that this would essentially downgrade Cloudflare to a DNS-only provider, which is what I tried to explain in my reply.

Not arguing with (or against) you, just trying to paint an accurate picture.

0

u/Dave3of5 Nov 24 '16

And the "accurate picture" is that you can use cloudflare as DNS provider what's you boggle with that ?

2

u/pfg1 Nov 24 '16

The accurate picture is that this doesn't provide any meaningful DDoS protection, which is not the impression I get when I read something like "They will still do DDoS filtering even with DNS only [...]". I'm not sure why you think I'm saying that Cloudflare cannot be used as a DNS provider, in fact my first post in this thread states that "[...] you're using Cloudflare as a DNS provider only".

→ More replies (0)

1

u/terrarum Nov 24 '16

Ah, I'm sorry! Your comment made me think you thought it wasn't possible to use LetsEncrypt SSL and Cloudflare SSL at the same time, that's all. Just FYI I haven't been downvoting you, and I don't think you're dissing LetsEncrypt.

You're right about performance of course, but if you were paranoid about security I imagine you'd want to encrypt the connection between origin and Cloudflare. I didn't know you could just use your origin's SSL and ignore Cloudflare's service, but if that's a paid service as /u/disclosure5 says than that explains why I didn't know that :D

2

u/Dave3of5 Nov 24 '16

You can simply use cloudflare as a very fast DNS provider on the free plan in fact I'm doing that at the moment with my blog. Yes you should also encrypt between cloudflare and origin. But if you already have the SSL cert on your origin server their is little benefit to using cloudflares ssl.

I actually use the setup you provide to get SSL to my web app which is on heroku because then I can use the heroku provided SSL cert (which is free) but use the SSL cert provided by CloudFlare for my domain.

1

u/terrarum Nov 24 '16

Oh cool. I did not know I could use my origin server's cert all the way to the browser, I thought I had to use Cloudflare's SSL. Thanks for the information!

3

u/pfg1 Nov 24 '16

Note that in that scenario, as /u/Dave3of5 mentions, you're not really using Cloudflare as anything other than a DNS provider. The records will point straight to your IP, and you won't get any of the caching, DDoS/WAF filtering Cloudflare offers.

2

u/Dave3of5 Nov 24 '16

You'll still get DDoS protection just not to same extent. The cloudflare DNS servers have to protect from thing like DNS amplification attacks to regardless if you use the extra stuff you will still get DDoS protection.

2

u/pfg1 Nov 24 '16

They won't stop a DNS amplification attack directed at your origin server. DNS amplification attacks use insecure third-party DNS servers (not Cloudflare's, or your domain's) to send large volumes of traffic at your site.

2

u/Dave3of5 Nov 24 '16

Yes you are correct here I shouldn't have mentioned amplification attacks.

1

u/terrarum Nov 24 '16

Ah, noteworthy. Thank you!

-1

u/disclosure5 Nov 24 '16

I know what cloudflare (I use it myself) is you don't have to use their SSL.

This requires a non-free plan.

2

u/Dave3of5 Nov 24 '16

Why do you think this requires a non-free plan I'm logged into cloud flare at the moment on the free plan and I can add A records or CNAME records all I want.

Edit: In fact my blog already does this and I'm on the free plan.

3

u/AntiProtonBoy Nov 24 '16

Still SSL though !

And that is what Let's Encrypt is ultimately advocating in the end. Making traffic more secure. Whether people use Let's Encrypt certs or some other service is immaterial, as long as people use them. Let's Encrypt simply offers an easier avenue for small site admins to use SSL.