Community discussions

MikroTik App
 
jamrobe
just joined
Topic Author
Posts: 6
Joined: Tue Oct 02, 2018 3:52 pm

Substring ( URI?) firewall filter

Sun Jan 03, 2021 3:32 pm

Hi all,

Need to know if this functionality can be implemented within Mikrotik routers

I have a RB4011 and would like to give access to only one external IP by firewall at a certain port, and when a fixed substring is attached to give access to everyone.

As an example.

Router public IP is MyPublicIP. LAN server IP 192.168.88.10, Port is 8888. Safe IP is MySafeIP
Access http://MyPublicIP:8888 only from MySafeIP is easy by basic IP Firewall and NAT to 192.168.88.10
However would like to give access to anyone typing http://MyPublicIP:8888/MyApp ( and only with MyApp substring )
or even better to change port http://MyPublicIP:9999/MyApp to go to 192.168.88.10:888/MyApp, everything else to be blocked.

Thanks for any help.
 
jamrobe
just joined
Topic Author
Posts: 6
Joined: Tue Oct 02, 2018 3:52 pm

Re: Substring ( URI?) firewall filter

Wed Jan 06, 2021 1:51 pm

no one? possible , not possible?
 
ak4020
just joined
Posts: 17
Joined: Mon Mar 23, 2020 11:35 am

Re: Substring ( URI?) firewall filter

Wed Jan 06, 2021 4:20 pm

hi, nobody in the world can do what you are looking for out of the box, what you need is a reverse proxy in addition to the rb. br
 
User avatar
nickshore
Member
Member
Posts: 497
Joined: Thu Mar 03, 2005 4:14 pm
Location: Suffolk, UK.
Contact:

Re: Substring ( URI?) firewall filter

Wed Jan 06, 2021 6:03 pm

You may be able to do it using the proxy:

https://wiki.mikrotik.com/wiki/Manual:IP/Proxy
Nick Shore MTCNA MTCWE MTCRE MTCINE MTCTCE
LinITX.com - MultiThread Consultants
Get your MikroTik RBs and Training: http://linitx.com/brand/mikrotik
Official UK MikroTik Distributor
IRC chan: #routerboard on irc.z.je (IPv4 and IPv6)
 
ak4020
just joined
Posts: 17
Joined: Mon Mar 23, 2020 11:35 am

Re: Substring ( URI?) firewall filter

Wed Jan 06, 2021 7:58 pm

You may be able to do it using the proxy:

https://wiki.mikrotik.com/wiki/Manual:IP/Proxy
So reverse proxy yes, but how do you want to solve that with a normal proxy?
 
Sob
Forum Guru
Forum Guru
Posts: 6484
Joined: Mon Apr 20, 2009 9:11 pm

Re: Substring ( URI?) firewall filter

Wed Jan 06, 2021 11:33 pm

Proxy in RouterOS can be misused as reverse proxy:

https://web.archive.org/web/20201111190 ... eb_Servers

It's not ideal, but I've seen people doing worse things.
Excessive quoting is useless and annoying. If you use it, please consider if you could do without it.
 
ak4020
just joined
Posts: 17
Joined: Mon Mar 23, 2020 11:35 am

Re: Substring ( URI?) firewall filter

Thu Jan 07, 2021 9:47 am

crazy, 2 years MT intensively over many data centers - but i haven't come across that yet with routeros, cool and sorry for my bottles of post then above
 
Sob
Forum Guru
Forum Guru
Posts: 6484
Joined: Mon Apr 20, 2009 9:11 pm

Re: Substring ( URI?) firewall filter

Thu Jan 07, 2021 5:04 pm

It's not that I'd recommend it, I see it more as hack, but it's possible.
Excessive quoting is useless and annoying. If you use it, please consider if you could do without it.
 
jamrobe
just joined
Topic Author
Posts: 6
Joined: Tue Oct 02, 2018 3:52 pm

Re: Substring ( URI?) firewall filter

Sat Jan 09, 2021 12:01 am

Thanks all for info.
I will try the routeros solution linked above.
If not succesful means I will have to learn how to setup a ngnix server.🤔
Cheers!

Who is online

Users browsing this forum: Bing [Bot], memelchenkov, xeon3d and 78 guests