Overview
Kerio Control allows you to use wildcards and regular expressions when you create a content rule based on a URL hostname or a URL group. Depending on the Content Filter rule action, website communication can be allowed, denied, or dropped.
Prerequisites
Navigate to Content Filter section in the Kerio Control Administration and create a new or edit existing Content rule
Solution
Wildcards
- In the Detected Content column, choose URL Hostname or URL groups option.
- Select the HTTP URL option.
- In the Site field, write the URL. Use substrings with special characters — * and ?. An asterisk (*) stands for any number of characters, a question mark (?) represents one character.
- Click OK.
Examples:
www.example.com/index.html
— a particular pagewww.*
— all URL addresses starting with www.*exploit*
— all URL addresses containing the exploit string*warez??.cz*
— all URL addresses containing such strings aswarezzz.cz
,warez99.cz
, etc.
Note: Do not select the HTTP URL by regular expression option if you want to use wildcards only.
Regular expressions
- In the Detected Content column, choose URL Hostname or URL groups option.
- Select the HTTP URL by regular expression option.
- In the Site field, write the regular expression. Kerio Control uses Perl Regular Expression Syntax. For more information, please refer to the Perl syntax Boost guide.
- Click OK.
Note: for the well-known detected categories and websites, like Facebook, Youtube, it's recommended to use Applications and Web Categories option, not raw URLs.
Confirmation
Based on the Content Filter rule action, website access is being denied or dropped (blank empty page).