LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-05-2013, 02:29 AM   #1
Zippy1970
Member
 
Registered: Sep 2007
Posts: 119

Rep: Reputation: 17
SSL Certificates and multiple domains


I host a few domains on my webserver and one uses SSL. Back when I installed it, I created a private key and a CSR, sent the CSR to a certificate authority (Comodo), received the certificates and installed them together with Comodo's root & intermediate certificates. No problems there.

Now one of my customers wants me to host their small website on my server as well. They also need SSL. So I told them to get a certificate and they did. They sent me the certificate through email. Problem is, I only got 3 certificates. The public key certificate, and Comodo's root & intermediate certificate.

Aren't I supposed to get their private key as well? The one they used to request the certificate?
 
Old 03-05-2013, 03:35 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you need their private key to load the certificate in the server, yes. Otherwise there would be thousands of fake SSL identified sites for google and microsoft out there.

but you do realize it's impossible to serve multiple certs on the same port? unless you have multiple IP addresses, you need a SINGLE certificate containing BOTH of the domain names, stored in Subject Alternative Name attributes, (SAN's)
 
Old 03-05-2013, 05:02 AM   #3
Zippy1970
Member
 
Registered: Sep 2007
Posts: 119

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by acid_kewpie View Post
ybut you do realize it's impossible to serve multiple certs on the same port? unless you have multiple IP addresses, you need a SINGLE certificate containing BOTH of the domain names, stored in Subject Alternative Name attributes, (SAN's)
No, I wasn't aware of that. I thought that was handled by apache. Why wouldn't this work (in apache):

Code:
NameVirtualHost 12.34.56.78:443

<VirtualHost 12.34.56.78:443>
  ServerName www.somedomain.com
  ServerAlias somedomain.com *.somedomain.com

  (snip)

  SSLEngine on
  SSLCertificateFile /etc/ssl/private/www_somedomain_com.crt
  SSLCertificateKeyFile /etc/ssl/private/somedomain_com.key
  SSLCACertificateFile /etc/ssl/private/SSL-bundle1.ca-bundle
</VirtualHost>

<VirtualHost 12.34.56.78:443>
  ServerName www.someotherdomain.com
  ServerAlias someotherdomain.com *.someotherdomain.com

  (snip)

  SSLEngine on
  SSLCertificateFile /etc/ssl/private/www_someotherdomain_com.crt
  SSLCertificateKeyFile /etc/ssl/private/someotherdomain_com.key
  SSLCACertificateFile /etc/ssl/private/SSL-bundle2.ca-bundle
</VirtualHost>
 
Old 03-05-2013, 05:07 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Because you perform the SSL handshake **BEFORE** you make an HTTP request. So there is no knowledge at all about what site you're going to ask for. The browser obviously knows what site you've asked for, but it's not asked the server for it yet at this point, so the first certificate available has to be served.

There are some HTTP extensions to permit this, but they are not at all standardised or implemented reliably yet.
 
Old 03-05-2013, 05:19 AM   #5
Zippy1970
Member
 
Registered: Sep 2007
Posts: 119

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by acid_kewpie View Post
Because you perform the SSL handshake **BEFORE** you make an HTTP request.
Ok, that makes sense.

In this case it's not really a problem since SSL on the other domain was for testing purposes only anyway, but it is something to keep in mind for next time.

I want to secure a few sites of my own all running on the same IP address. So I need a single certificate for them all, right? Also, would I be able to add domains to the certificate in the future? Or do I simply need to purchase a new certificate that contains all domains?
 
Old 03-05-2013, 05:24 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
TBH I've rarely been involved in the actual purchase arrangements of the certificates, but you'd want one certificate with multiple SAN's. I don't *think* SAN's cost extra, (a wildcard cert, e.g. to cover *.domain.com would though) so a new cert for one site *should* cost (approx) the same as a replacement cert with another SAN. Note though that the client will get that cert and be able to see all of the FQDN's that that cert can support. If this goes between different commercial customers, this can be an issue.
 
Old 03-05-2013, 01:18 PM   #7
grim76
Member
 
Registered: Jun 2007
Distribution: Debian, SLES, Ubuntu
Posts: 308

Rep: Reputation: 50
There is a way to host multiple sites SSL enabled on nginx with a single IP. I know that you are using Apache now for your hosting needs, but figured I would throw that option out there.
 
Old 03-05-2013, 02:21 PM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by grim76 View Post
There is a way to host multiple sites SSL enabled on nginx with a single IP. I know that you are using Apache now for your hosting needs, but figured I would throw that option out there.
no, it's not Apache, it's SSL. When a browser is asked to connect to an https site the very very first thing it does in an SSL handshake, it has no way of evening knowing what kind of server it's talking to. could be an HTTP server, could be NNTPS, could be FTPS, SMTPS, anything, let alone what the server is specifically.

Here's the solution... SNI... but http://en.wikipedia.org/wiki/Server_Name_Indication but It's not very commonly used at all, although TBH, maybe less uncommon than I thought before reading this.
 
Old 03-06-2013, 09:36 AM   #9
grim76
Member
 
Registered: Jun 2007
Distribution: Debian, SLES, Ubuntu
Posts: 308

Rep: Reputation: 50
We have been employing SNI for the customers that we have to preserve IP space. It works for us pretty well. Problem is sometimes you get someone that is not using an up to date browser/OS.
 
Old 03-07-2013, 02:43 AM   #10
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,474

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Quote:
Originally Posted by acid_kewpie View Post
Here's the solution... SNI... but http://en.wikipedia.org/wiki/Server_Name_Indication but It's not very commonly used at all, although TBH, maybe less uncommon than I thought before reading this.
I believe there's an apache module that can handle this. The way we are doing it is with a Citrix NetScaler front-ending the web servers. We use a Comodo Multi-Domain certificate for it with something like 15 domains on it.
 
Old 03-07-2013, 02:48 AM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by TenTenths View Post
I believe there's an apache module that can handle this. The way we are doing it is with a Citrix NetScaler front-ending the web servers. We use a Comodo Multi-Domain certificate for it with something like 15 domains on it.
booo, NetScaler suxxxxx, BigIP 4eva!

Yeah the wikipedia article says mod_ssl can handle it in very recent builds of the module.
 
Old 03-07-2013, 03:18 AM   #12
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,474

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Quote:
Originally Posted by acid_kewpie View Post
booo, NetScaler suxxxxx, BigIP 4eva!
Meh! Netscaler as a virtual appliance and Juniper SSG firewalls, working fine for us
 
Old 03-07-2013, 06:19 AM   #13
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by acid_kewpie View Post
Yeah the wikipedia article says mod_ssl can handle it in very recent builds of the module.
... and even not so recent (depending on your definition).
The apache mod_ssl in Debian Squeeze is doing it fine for us.
 
  


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
Squid reverse proxy + SSL or hosting multiple domains from one IP friskydrifter Linux - Networking 8 11-19-2009 12:00 AM
Multiple emails accounts(with different from domains) on multiple domains on 1 server locoputo Linux - Server 0 04-12-2009 06:29 PM
SSL Certificates ashiers Linux - Security 2 06-30-2006 08:39 AM
ssl certificates champ Linux - Security 2 04-05-2003 09:47 AM
Multiple SSL Certificates Per IP Address dkochan Linux - General 1 03-05-2002 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:49 AM.

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