Community discussions

MikroTik App
 
nubie
just joined
Topic Author
Posts: 18
Joined: Mon Dec 21, 2009 9:40 am

Block multiple keyword using just one rule in web proxy ???

Thu Apr 29, 2010 1:02 pm

Hi all, it is possible to add multiple keyword for blocking with just one rule in web proxy access?, for example i need to block keyword:
test, second, third, so i've been trying to use like this in path of web proxy access:*test*, *second*, *third*, but it's not working at all.

And why if i put same keyword in dst-host and path it will not work, for example i put *test* on dst-host: and path: in web proxy access
but it will not work.

Need advice and enlightment please and sorry for disturbing your time.


Thank's a lot.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Block multiple keyword using just one rule in web proxy

Thu Apr 29, 2010 2:54 pm

if you use both fields, logical 'AND' operation is used. so both server name and path on the server should contain 'test' to be matched by that rule (for example, 'http://test123.foobar.com/my/test/index.php)
 
dssmiktik
Forum Veteran
Forum Veteran
Posts: 732
Joined: Fri Aug 17, 2007 8:42 am

Re: Block multiple keyword using just one rule in web proxy

Thu Apr 29, 2010 8:15 pm

If you'd like to include multiple keyword matches in a single rule, you could use regular expression matching.

Ex. To deny all requests that contain the word "test", "second", or "third" in their host request:
/ip proxy access add dst-host=":(test|second|third)" action=deny
A good understanding of regular expressions is required. For a good reference, read more here: http://en.wikipedia.org/wiki/Regular_ex ... Unix.5D.29
 
nubie
just joined
Topic Author
Posts: 18
Joined: Mon Dec 21, 2009 9:40 am

Re: Block multiple keyword using just one rule in web proxy

Fri Apr 30, 2010 5:25 am

Hi, thank's a lot for your replies, dssmiktik i've been trying the rule that you mentioned above but still it can connect based on the keyword,
is there any kind of condition to do that, i used Mikrotik router OS v 3.11.

Need help please.

Thank's a lot
 
dssmiktik
Forum Veteran
Forum Veteran
Posts: 732
Joined: Fri Aug 17, 2007 8:42 am

Re: Block multiple keyword using just one rule in web proxy

Fri Apr 30, 2010 10:33 am

I tested the rule, and it works good, I'm using RouterOS v4.8. Try to upgrade to at least v3.23 and see if that makes a difference.

Who is online

Users browsing this forum: Bing [Bot], johnson73, Mikuser17, shahzaddj1 and 190 guests