Page 1 of 1
RouterOS as frontend. posible?
Posted: Fri Mar 18, 2016 5:03 am
by pito
Subj
How i can make my mikrotik router as frontend server for my www services. If it posible...
Show examples pls.
Re: RouterOS as frontend. posible?
Posted: Fri Mar 18, 2016 7:28 am
by Van9018
A Mikrotik won't serve web pages. But you can forward ports to your webserver.
http://wiki.mikrotik.com/wiki/Forwardin ... nternal_IP
/ip firewall nat add chain=dstnat dst-address=69.69.69.69 protocol=tcp dst-port=80 \
action=dst-nat to-addresses=192.168.1.2
Re: RouterOS as frontend. posible?
Posted: Fri Mar 18, 2016 12:32 pm
by pito
No. I have domains first.my-
www.com and second.my-
www.com on single ip-adres.
Need forward first to ip 10.10.10.1 and second to 10.10.10.2 in my DMZ.
Re: RouterOS as frontend. posible?
Posted: Fri Mar 18, 2016 1:37 pm
by normis
No. I have domains first.my-
www.com and second.my-
www.com on single ip-adres.
Need forward first to ip 10.10.10.1 and second to 10.10.10.2 in my DMZ.
I can't think of a way to do this. Only if you had two public IP addresses
Re: RouterOS as frontend. posible?
Posted: Fri Mar 18, 2016 2:52 pm
by Sob
There's a way, documented in wiki:
Multiple Web Servers
It's limited to http only and it's hard to tell how reliability and performance would be, but it may be good enough for some uses.
Re: RouterOS as frontend. posible?
Posted: Fri Mar 18, 2016 3:32 pm
by normis
This is a VERY BAD IDEA and a dangerous article. Basically you are making an open proxy for everyone on the internet, without any control or security.
Re: RouterOS as frontend. posible?
Posted: Fri Mar 18, 2016 3:51 pm
by Sob
There are access rules mentioned at the end of article and even explicit warning about how important they are. I'm not saying the whole thing is prefered solution, but it should be safe.
Re: RouterOS as frontend. posible?
Posted: Fri Mar 18, 2016 3:58 pm
by normis
There are access rules mentioned at the end of article and even explicit warning about how important they are. I'm not saying the whole thing is prefered solution, but it should be safe.
I was so worried, that didn't read to the end. Ok then.
Re: RouterOS as frontend. posible?
Posted: Mon Mar 21, 2016 2:45 am
by pito
Thank you! I try it.
Re: RouterOS as frontend. posible?
Posted: Mon Mar 21, 2016 4:38 am
by Van9018
Maybe IP > Firewall > Layer 7 Protocols could work for http-only connections?
This function is supposed to scan the first 1024 bytes of a packet for something that matches a given regex. Apply it tcp packets, connection-state=new
regex: GET.+?\nhost:\s*?mysite\.com\n
Since it only applies to tcp SYN packets, maybe it's performance will be acceptable.
Re: RouterOS as frontend. posible?
Posted: Mon Mar 21, 2016 8:22 pm
by Sob
regex: GET.+?\nhost:\s*?mysite\.com\n
When the request comes, it's too late, because it's not in the first packet.