Community discussions

MikroTik App
 
pito
just joined
Topic Author
Posts: 7
Joined: Fri Mar 06, 2015 3:41 am

RouterOS as frontend. posible?

Fri Mar 18, 2016 5:03 am

Subj
How i can make my mikrotik router as frontend server for my www services. If it posible...
Show examples pls.
 
Van9018
Long time Member
Long time Member
Posts: 558
Joined: Mon Jun 16, 2014 6:26 pm
Location: Canada - Abbotsford

Re: RouterOS as frontend. posible?

Fri Mar 18, 2016 7:28 am

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
 
pito
just joined
Topic Author
Posts: 7
Joined: Fri Mar 06, 2015 3:41 am

Re: RouterOS as frontend. posible?

Fri Mar 18, 2016 12:32 pm

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.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26918
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: RouterOS as frontend. posible?

Fri Mar 18, 2016 1:37 pm

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
 
Sob
Forum Guru
Forum Guru
Posts: 9188
Joined: Mon Apr 20, 2009 9:11 pm

Re: RouterOS as frontend. posible?

Fri Mar 18, 2016 2:52 pm

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.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26918
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: RouterOS as frontend. posible?

Fri Mar 18, 2016 3:32 pm

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.
 
Sob
Forum Guru
Forum Guru
Posts: 9188
Joined: Mon Apr 20, 2009 9:11 pm

Re: RouterOS as frontend. posible?

Fri Mar 18, 2016 3:51 pm

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.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26918
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: RouterOS as frontend. posible?

Fri Mar 18, 2016 3:58 pm

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.
 
pito
just joined
Topic Author
Posts: 7
Joined: Fri Mar 06, 2015 3:41 am

Re: RouterOS as frontend. posible?

Mon Mar 21, 2016 2:45 am

Thank you! I try it.
 
Van9018
Long time Member
Long time Member
Posts: 558
Joined: Mon Jun 16, 2014 6:26 pm
Location: Canada - Abbotsford

Re: RouterOS as frontend. posible?

Mon Mar 21, 2016 4:38 am

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.
 
Sob
Forum Guru
Forum Guru
Posts: 9188
Joined: Mon Apr 20, 2009 9:11 pm

Re: RouterOS as frontend. posible?

Mon Mar 21, 2016 8:22 pm

regex: GET.+?\nhost:\s*?mysite\.com\n
When the request comes, it's too late, because it's not in the first packet.

Who is online

Users browsing this forum: dcavni, haedertowfeq, saluki and 35 guests