Community discussions

MikroTik App
 
johanbobbies
just joined
Topic Author
Posts: 8
Joined: Mon Mar 28, 2022 10:45 am

Walled Garden Regex

Tue Apr 05, 2022 2:39 pm

Hi All.

We want to create a walled garden rule that will allow traffic if a certain string is contained with in the URL/path..

i.e www.mydomain.com/xyx_test/cy

If *test* is in the URL/Path the rule needs to apply. We have tried multiple iterations

"\btest\b"
/\/.*test*./
":/test/$"
etc
in both path and dest host

can someone please advise what the correct syntax would be and the correct format of the walled garden rule
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Walled Garden Regex

Tue Apr 05, 2022 9:12 pm

Can not work on httpS
You can not read URL inside any version of HTTPS.

One exception is only the domain name on SNI, but on firewall, until the version is TLS 1.2 or lower
 
johanbobbies
just joined
Topic Author
Posts: 8
Joined: Mon Mar 28, 2022 10:45 am

Re: Walled Garden Regex

Tue Apr 05, 2022 9:19 pm

Thanks for the reply

Appreciate the input.

Back to the drawing board
 
RickyReyesmatrina
just joined
Posts: 3
Joined: Fri Apr 01, 2022 10:18 am

Re: Walled Garden Regex

Mon Apr 11, 2022 1:15 pm

Other protocols can also be included in Walled Garden, but that is configured elsewhere (in /ip hotspot walled-garden ip; see the next section of this manual for details)
Property Description
action (allow | deny; default: allow) - action to undertake if a packet matches the rule:
allow - allow the access to the page without prior authorization
deny - the authorization is required to access this page

dst-address (IP address) - IP address of the destination web server

dst-host (wildcard; default: "") - domain name of the destination web server (this is a wildcard)

dst-port (integer; default: "") - the TCP port a client has send the request to

method (text) - HTTP method of the request

path (text; default: "") - the path of the request (this is a wildcard)

server (name) - name of the HotSpot server this rule applied to

src-address (IP address) - IP address of the user sending the request

Notes

Wildcard properties (dst-host and dst-path) match a complete string (i.e., they will not match "example.com" if they are set to "example"). Available wildcards are '*' (match any number of any characters) and '?' (match any one character). Regular expressions are also accepted here, but if the property should be treated as a regular expression, it should start with a colon (':').

Who is online

Users browsing this forum: EmuAGR, rogerioqueiroz and 24 guests