How do I do that? I'm especially interested in how I configure it to use a TCP reset.
In firewall rules use action "reject" instead of "drop". "Drop" means silently discard the packet without sending any notice to the requests origin. "Reject" means actively telling the source that this packet is not allowed.
Has anyone looked at the HTTP headers that are sent to the client on the first response to an HTTPS request?
That is too late in the process. At this point (sending a response) the browser already compared the certificates name with the domain the user entered into the address bar in his browser, because the browser also has to make sure it sends to the correct server.
I'm just wondering what it has for the HOST parameter. If it says google.com for example, and passes a certificate for a different domain, then the warning would make sense. If it says mydomain.com for example, and passes a certificate for mydomain.com, then there might be some hope that the browser would be happy with it. Also, is it a 200? Or a 301?
Most hotspot systems do not use HTTP redirects but use its firewall capabilities to reject/drop
all IP packets, and IP packets to TCP Port 80 gets redirected
by the firewall to some internal server. At this point the requested domain is already saved for dns name comparison in the browser and will be compared with the certificate's name of the internal HTTP server. The hotspot system might know the requested dns name (if it monitors dns requests), but as i wrote on March 2nd, then the hotspot would need to generate certificates for every possible (requested) domain on-the-fly and get it signed by a Certificate Authority (CA) that is in the users computer trust store. I can't be done without the power to manipulate users computer.