Earlier quoted context omitted.
You can absolutely do that with name constraints extension set on the root CA certificate. You should verify compatibility but it's pretty universally supported on modern browsers and consumer devices last I checked. nameConstraints=critical,permitted;DNS:.iso1631.internal - "critical" ensures that any clients who don't understand this extension fail the certificate validation outright instead of ignoring it. - "DNS:…
If you generate the root CA sure. However name constraints aren't well supported. A far better option would be to allow me, the user, to do this in the user agent. I can import my mitm cert and today I can trust it for "abc123.com" and point that to something I want to access in that manner for some reason, but tomorrow simply toggle that trust off. If I find that I want to use a specific website and want to do somet…
> If I find that I want to use a specific website and want to do something with the traffic...
I agree but that's a different problem. If you just need a certificate for your router and some internal services (the original discussion), you can do that using an internal root CA and you have nothing to worry about as long as you using name constraints.
On IoT devices without nameConstraints support I just use an alternative CA certificate without name constraints (same key, different extensions).