HTTPS Certificate for internal use

SslHttpsCertificate

Ssl Problem Overview


I'm setting up a webserver for a system that needs to be used only through HTTPS, on an internal network (no access from outside world)

Right now I got it setup with a self-signed certificate, and it works fine, except for a nasty warning that all browsers fire up, as the CA authority used to sign it is naturally not trusted.

Access is provided by a local DNS domain name resolved on local DNS server (example: https://myapp.local/), that maps that address to 192.168.x.y

Is there some provider that can issue me a proper certificate for use on an internal domain name (myapp.local)? Or is my only option to use a FQDN on a real domain, and later map it to a local IP address?

Note: I would like an option where it's not needed to mark the server public key as trusted on each browser, as I have not control over workstations.

Ssl Solutions


Solution 1 - Ssl

You have two practical options:

  1. Stand up your own CA. You can do it with OpenSSL and there's a lot of Google info out there.

  2. Keep using your self-signed cert, but add the public key to your trusted certs in the browser. If you're in an Active Directory domain, this can be done automatically with group policy.

Solution 2 - Ssl

I did the following, which worked nicely for me:

I got a wildcard SSL cert for *.mydomain.com (Namecheap, for example, provide this cheaply)

I created a CNAME DNS record pointing "mybox.mydomain.com" at "mybox.local".

I hope that helps - unfortunately you'll have the expense of a wildcard cert for your domain name, but you may already have that.

Solution 3 - Ssl

You'd have to ask the typical cert people for that. For ease of use I'd get with the FQDN though, you might use a subdomain to your already registered one: https://mybox.example.com

Also you might want to look at wildcard certificates, providing a blanket cert for (e.g.) https://*.example.com/ - even usable for virtual hosting, should you need more than just this one cert.

Certifying sub- or sub-sub domains of FQDN should be standard business - maybe not for the point&click big guys that proud themselves to provide the certificates in just 2 minutes.

In short: To make the cert trusted by a workstation you'd have to either

  • change settings on the workstations (which you don't want) or
  • use an already trusted party to sign your key (which you're looking for a way around).

That's all your choices. Choose your poison.

Solution 4 - Ssl

I would have added this as a comment but it was a bit long..

This is not really an answer to your questions, but in practice I've found that it's not recommended to use a .local domain - even if it's on your "local" testing environment, with your own DNS Server.

I know that Active Directory uses the .local name by default when your install DNS, but even people at Microsoft say to avoid it.

If you have control over the DNS Server you can use a .com, .net, or .org domain - even if it's internal and private only. This way, you could actually buy the domain name that you are using internally and then buy a certificate for that domain name and apply it to your local domain.

Solution 5 - Ssl

I had a similar requirement, have our companys browsers trust our internal websites.

I didnt want our public DNS to issue public DNS for our internal sites, so the only way to make this work that I found was to use an internal CA.

Heres the writeup for this,

https://medium.com/@mike.reider/getting-firefox-chrome-to-trust-your-internal-websites-internal-certificate-authority-a53ba2d4c2af

Solution 6 - Ssl

i think the answer is NO.

out-of-the-box, browsers won't trust certificates unless it's ultimately been verified by someone pre-programmed into the browser, e.g. verisign, register.com.

you can only get a verified certificate for a globally unique domain.

so i'd suggest instead of myapp.local you use myapp.local.yourcompany.com, for which you should be able to get a certificate, provided you own yourcompany.com. it'll cost you thought, several hundred per year.

also be warned wildcard certificates might only go down to one level -- so you could use it for a.yourcompany.com and local.yourcompany.com but maybe not b.a.yourcompany.com or myapp.local.yourcompany.com, unless you pay more.

(does anyone know, does it depend on the type of wildcard certificate? are sub-sub-domains trusted by the major browsers?)

Solution 7 - Ssl

Development purpose only

This docker image solves the problem (thanks to local-ip.co): https://github.com/medic/nginx-local-ip.

It launches a reverse proxy in the port 443 with a public cert that works with any *.my.local-ip.co domain. Eg. your local IP is 192.168.10.10 → 192-168-10-10.my.local-ip.co already points to it (it's a public domain)! Assuming the app is running in your computer at the port 8080, you only need to execute this to proxy pass your app and expose it at the URL https://192-168-10-10.my.local-ip.co:

$ APP_URL=http://192.168.10.10:8080 docker-compose up

The domain is resolved with any public DNS you have configured in the devices where you want to access the app, but your traffic keeps local between your app and the client (through the proxy), so you can even use it to connect with devices within the same LAN network, without any of the traffic going out to internet, all the traffic is local.

The reason that is mostly useful for development is that anybody can launch an application with this same certificate, so is not really secure, but helpful when you need to expose your app with HTTPS while developing or testing (e.g. HTML5 apps in Android that are loaded with Webview).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionPablo AlsinaView Question on Stackoverflow
Solution 1 - SslspoulsonView Answer on Stackoverflow
Solution 2 - SslPaul HigginsView Answer on Stackoverflow
Solution 3 - SslOlaf KockView Answer on Stackoverflow
Solution 4 - Ssluser67143View Answer on Stackoverflow
Solution 5 - Sslperfecto25View Answer on Stackoverflow
Solution 6 - SslPartly CloudyView Answer on Stackoverflow
Solution 7 - SslMariano RuizView Answer on Stackoverflow