How to NAT based on the https site requested

I have a couple of servers with IIS and about 3 web sites per server. I would like to make NATs so I can access from outside using only https my internal web sites. Public DNS is set. Do I have to read the Content on NAT Rule > Advanced or there is some other way?

wiki https://wiki.mikrotik.com/wiki/How_to_link_Public_addresses_to_Local_ones

And how I can detect what website is requested if it is a https? If I don’t know the website I don’t know where to nat.

https use TCP port 443 by defaults

I know that is 443. But at 443 there are 9 websites. 3 websites are on one server, 3 on the second and so on. How can I redirect?

Maybe you could make use of an layer 7 firewall filter using a regular expression matching your subpage syntax?

Maybe you could make use of an layer 7 firewall filter using a regular expression matching your subpage syntax?

I think is simpler if I read the incoming requested URL on 443 and based of the requested site I redirect. Can i use IP > Firewall > NAT > Advanced > Content?

It’s not possible. You must NAT tcp connection from the first packet. First packet is SYN packet, it doesn’t contain any data payload, just IP addresses and ports.

Ok, thank you. But any other suggestion or link how to do it? I red that a transparent proxy works only with http.

Yep, you need any reverse https proxy, like nginx or something. On dedicated machine. Or just one more IP address :slight_smile: