There is a system that uses iptables to mark and redirect all connections to port 80 of the web server, the web server, in turn, receives the user's MAC via the command / usr / sbin / arp -an IP and offers to authorize or perform some action.
But there is a problem with HTTPS, i.e. if the user opens http, the gateway will redirect him to his ip on port 80, and if the user opens https://google.com, then the redirection will occur on port 443. This is where the issue with certificates begins, i.e. a google certificate is checked against the gateway domain, and a mismatch error occurs.
How to avoid such a problem? Is it possible to do this via iptables, dns or nginx?