Certificate question

Hap

Ars Legatus Legionis
12,694
Subscriptor++
I have a lot of things internal to my network that won't use https without a certificate. A few (like security cameras) are accessible from outside the LAN.


The question I have is that I have domain names that point to my external access IP address (fixed) and a separate domain internal to the network.

Let's call the external domain external.org and the internal domain internal.org.

If I want to set up a certificate on my Security Camera NVR, do I use security_cam.external.org or security_cam.internal.org? The camera system only knows about internal.org, but external DNS only knows about external.org.

I was planning on setting up my on internal CA server and trusting it, it's those cases where it crosses the internal/external boundary that I have no clue how to handle. The other option is to always VPN in, but that has proved challenging for my wife to wrap her head around and she wants access to the security cams and home automation.

I have a lot going on in my internal network (I like to tinker) and have my own DNS/DHCP servers running and the internal FQDN is used constantly for dozens of things. Like my router is pfsense.internal.org and my pbx server is pbx.internal.org etc.... So I really want to work within the internal domain constraints. Most have Let's Encrypt built in, but require a) Let's Encrypt to be able to resolve the domain name b) external https access to the devices and I don't want all accessible to the external world (like my pbx server) over admin ports.

Any guidance/pointers would be welcome.
 

Paladin

Ars Legatus Legionis
33,855
Subscriptor
Just treat everything as 'external'. DNS doesn't care about one or the other. Some hostnames go to publicly accessible IP addresses, some go to internally accessible IP addresses. If you're buying real certificates or using LetsEncrypt then you need at least somewhat publicly resolvable hostnames/domain anyway.

If you are using a fake internal domain (not a real registered domain name) for your internal network and plan to use certificates issued from your own internal certificate authority server that you configure your devices to trust then you can probably skip the externally resolvable hostnames but I would just make things easy on myself and put all the DNS 'external'. Firewalls are for controlling access, DNS is for enabling name resolution. Don't try to use DNS to do security.
 

Hap

Ars Legatus Legionis
12,694
Subscriptor++
I have a fully registered domain name for the internal network. I don't use it for security, but I'm not following about how to setup all the internal systems with external host names yet have a private IP address. If I use my external IP address, then will how everything find the right host internal to the network?

I was planning on rolling my own internal CA server, but wasn't sure how that would work since access the NVR from outside the network would use

nvr.external.org, while internal would use nvr.internal.org - wasn't sure how to do that part with certificates. That seems it would be easier with everything externally addressable, but seems like the DNS/IP part of it would be more complicated.

I use static DHCP assignments with hostnames that roll right over into my local DNS so everything is easily findable on a /23.
 

Paladin

Ars Legatus Legionis
33,855
Subscriptor
Yeah if you have a regular registered domain name (let's say booglebanglechunder.com), you can make the host names go to whatever IP address you want. Internal hostnames for internal IPs, external for external IPs, etc. printer1.booglebanglechunder.com goes to an internal IP since there is no port forward for the printer (presumably) so you have that hostname resolve to 10.30.30.10 (assuming that is the actual IP address of the printer), and so on. If you have some IP address that is forwarded through your router via network address translation (or if you use IPv6) then make a hostname that resolves to that externally accessible IP address like web1.booglebanglechunder.com resolves to 123.231.321.123 or whatever your IP address is.

Then build your certificate authority server setup and issue certificates to match those hostnames. If you want to use LetsEncrypt, you'll need to have those hostnames be accessible to some degree, it can be tricky setting that up for internal only resources but it should be possible with some fiddling as long as the hostnames are actually possible to resolve from the internet. I would guess that lots of stuff on your internal network won't support LetsEncrypt anyway (printers and similar appliances and stuff) so that probably isn't an issue.
 

malor

Ars Legatus Legionis
16,093
You might find 'split horizon DNS' to be a useful tool. You get a resolver running, where it answers with external IP addresses for external queries, and internal addresses for internal queries. Then you can set everything up to connect to DNS names, and it will just work, wherever the device is.

This does require administrative work on your end, in that you have to maintain two sets of addresses, but it sounds like you're doing that anyway.
 

Incarnate

Ars Tribunus Angusticlavius
9,037
Subscriptor++
A few (like security cameras) are accessible from outside the LAN.
I know this is a bit off topic, but that could cause your internal network to become compromised quite easily. Those IoT devices are typically inexpensive, and not updated with security patches by the vendor (or individuals). I'd recommend a VPN if you need to access resources on your internal network from remote.
 

Hap

Ars Legatus Legionis
12,694
Subscriptor++
A few (like security cameras) are accessible from outside the LAN.
I know this is a bit off topic, but that could cause your internal network to become compromised quite easily. Those IoT devices are typically inexpensive, and not updated with security patches by the vendor (or individuals). I'd recommend a VPN if you need to access resources on your internal network from remote.

Understood.

Only the NVR is accessible from outside and it IS regularly updated, cameras themselves are isolated.

VPN is something I plan on doing.