Community discussions

MikroTik App
 
Antonio06
just joined
Topic Author
Posts: 17
Joined: Fri Sep 07, 2012 4:14 pm

How to NAT based on the https site requested

Wed Jan 10, 2018 1:55 am

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?
 
User avatar
ADahi
Member Candidate
Member Candidate
Posts: 209
Joined: Thu Sep 21, 2017 7:16 pm
Location: Iraq, Ninavah
Contact:

Re: How to NAT based on the https site requested

Wed Jan 10, 2018 10:24 am

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_l ... Local_ones
 
Antonio06
just joined
Topic Author
Posts: 17
Joined: Fri Sep 07, 2012 4:14 pm

Re: How to NAT based on the https site requested

Wed Jan 10, 2018 10:45 am

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_l ... 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.
 
User avatar
ADahi
Member Candidate
Member Candidate
Posts: 209
Joined: Thu Sep 21, 2017 7:16 pm
Location: Iraq, Ninavah
Contact:

Re: How to NAT based on the https site requested

Wed Jan 10, 2018 10:57 am

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_l ... 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
 
Antonio06
just joined
Topic Author
Posts: 17
Joined: Fri Sep 07, 2012 4:14 pm

Re: How to NAT based on the https site requested

Wed Jan 10, 2018 9:33 pm

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?
 
wirSeefahrer
just joined
Posts: 13
Joined: Tue Jul 26, 2016 12:52 pm

Re: How to NAT based on the https site requested

Thu Jan 11, 2018 2:30 am

Maybe you could make use of an layer 7 firewall filter using a regular expression matching your subpage syntax?
 
wirSeefahrer
just joined
Posts: 13
Joined: Tue Jul 26, 2016 12:52 pm

Re: How to NAT based on the https site requested

Thu Jan 11, 2018 2:31 am

Maybe you could make use of an layer 7 firewall filter using a regular expression matching your subpage syntax?
 
Antonio06
just joined
Topic Author
Posts: 17
Joined: Fri Sep 07, 2012 4:14 pm

Re: How to NAT based on the https site requested

Thu Jan 11, 2018 9:43 am

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?
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: How to NAT based on the https site requested

Thu Jan 11, 2018 12:00 pm

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.
 
Antonio06
just joined
Topic Author
Posts: 17
Joined: Fri Sep 07, 2012 4:14 pm

Re: How to NAT based on the https site requested

Thu Jan 11, 2018 3:01 pm

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.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: How to NAT based on the https site requested

Thu Jan 11, 2018 3:04 pm

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

Who is online

Users browsing this forum: alixviral, mszru, sas2k, vetal12311 and 203 guests