Getting certificate error warning when accessing server using its internal IP over VPN

Copper Contributor
I've given my web server an SSL certificate from my own CA. the certificate has (Server and client authentication in addition to IP security IKE because i use the same certificate for my SSTP VPN Server). certificate's subject name (Type=CN Common name) is the external domain name that points to my server's public IP address. In certificate's alternative name, I set it to DNS type and added the server's local domain name (server-2.test.local).

so when I type in the external domain name into a browser of a non-local computer, my test website from that server loads fine over HTTPS, no certificate error whatsoever.

but when I first connect to my local network using SSTP VPN (VPN host name is the same as the external domain name that points to my server's public IP address), and then once i'm connected, I try to use the local domain name of my server in the browser, i get this certificate error.




This server couldn't prove that it's [server's local domain name]; its security certificate is from [server's external domain name]. This may be caused by a misconfiguration or an attacker intercepting your connection.



what am i missing or doing wrong?

i don't know if it's related but on IIS server, I have set a rule to redirect HTTP to HTTPS.

my question is not a duplicate of the other one linked here. that question is not about 2 DNS names (one local and one external) it's about 1 DNS name and 1 localhost.



3 Replies
best response confirmed by Kirin990 (Copper Contributor)

Hi there,

It seems that you certificate does not contain the IP as a SAN.

Also please take a look at this: