iptables can't redirect ip:443 to another ip:port (where I have apache2 virtualhost published with the info block page)
You could redirect the TCP/IP stream, but the browser will show a security warning, as you'll be unable to present a valid certificate.
squid-cache only shows information in the browser when it is an http page with "error page" (Custom error pages not displayed for HTTPS) (for more information check here)
As you note, browsers don't show error page for TLS; upon receiving anything but a 200 code, they show their own error message.
Almost all traffic today is TLS encrypted, and you can't view it or modify it. That is: You cannot claim you're example.com
, nor can you redirect example.com
to anything else.
Unless you have total control over the clients, and can install a new root certificate, you can't claim to be example.com
.
PS: In case there is some method to block and display a blocking page that allows https traffic (tcp 443) to go to this page, I would appreciate a detailed explanation with specific examples..
There is no such method that works with modern browsers, and that is not a mistake; it's a design feature of tls. It's supposed to stop man in the middle attacks - which is essentially what you're attempting to do.
So no, there is no method to achieve what you attempt to achieve. If there was, it'd be a major security problem.