14.1. The Ad Blocking tab

Sekce WWW / Ad blocking — Options

Figure 14.1. Sekce WWW / Ad blocking — Options

Kerio Personal Firewall provides the following ad blocking options:

Block advertisement

Use this option to block ads according to the defined rules. Use the Set button to open a dialog for definition of these rules (see below).

Block pop-up and pop-under windows

Use this option to deny automatic opening of undesirable browser windows (popup is a window opened over an active browser window; pop-under is a window opened under an active browser window).

Temporarily override by pressing down the ... key

If this option is enabled, holding down a selected key (Ctrl or F12) will temporarily disable pop-up and pop-under windows blocking (i.e. unless a page is loaded).

The Kerio Personal Firewall icon on the Systray indicates when pop-up and pop-under blocking is disabled.

Systray icon — Pop-up filter disabled

Figure 14.2. Systray icon — Pop-up filter disabled

Warning: The F12 key may collide with the Microsoft debugger. If you use the Microsoft Visual Studio, we recommend you to use the Ctrl key.

Block JavaScript, Block VBScript

Enable these options to filter all commands of the corresponding script run from a website.

Notes: These options might cause problems with displaying of some pages. If so, define special rules for such pages in the Exception Sites tab, or disable the Block pop-up and pop-under windows option and use another method to filter ads (i.e. the Block advertisements option).

These options might cause problems in displaying of some pages or malfunctions — in such cases modify firewall settings as described in the previous item.

Ad Filtering Rules

Click on the Set button to open a dialog where ad filtering rules can be edited, removed or added.

Ad Filtering Rules

Figure 14.3. Ad Filtering Rules

Each rule consists of two parts — Server part (name or IP address of a particular Web server) and Local part (relave address of a particular object at the server).

Only one of these items can be specified.

  • If the WWW Server item is empty, the rule will be applied on the specified relative address at any server.

  • If the Path on server entry is empty, the rule will be applied on any object at the specified server (this Web server then cannot be accessed

Use matching fields in the Active column to enable/disable individual rules. This way rules can be disabled temporarily (it is not necessary to remove rules and add them later).

Use the Edit, Remove and Add buttons to edit or remove selected rules or to add a new one. Kerio Personal Firewall includes set of predefined rules (marked with an icon). Predefined rules cannot be edited nor removed, they can only be enabled or disabled.

Kerio Personal Firewall includes database of predefined rules. These rules are marked with a corresponding icon. Predefined rules cannot be modified or removed, they only can be enabled or disabled. The database is updated whenever a new version of Kerio Personal Firewall is installed. Only parameters of the Active column will be kept after an update (rules which have been disabled by the user will not be enabled during an update).

Click on the Add or the Edit button to define ad filtering rules. Such rules consist of two parts:

  • WWW server — name of a WWW server

  • Path on server — path to an object (object localization) placed on the server

Both the wildcard characters or the regular expressions (more complex definitions for experienced users) can be used for this definition.

Rule Definition using Wildcard Characters

Definition of Ad Filtering Rule — Using Wildcard Characters

Figure 14.4. Definition of Ad Filtering Rule — Using Wildcard Characters

If the Use regular expressions instead of wildcard characters is disabled, the following wildcard characters can be used for definition of the WWW server and the Path on server entries:

  • * (asterisk) — represents any number of characters (even an empty string)

  • ? (question mark) — represents any single character

Examples:

  • The WWW server entry is defined by the string *.kerio.com. Unlike for example www.akerio.com, WWW servers www.kerio.com or download.kerio.com will match with this string.

  • The WWW server entry contains the string www.kerio.f?. WWW servers www.kerio.fr or www.kerio.fx will match with this string, WWW server www.kerio.com will not.

Rule Definition using Regular Expressions

Definition of Ad Filtering Rule — Using regular expressions

Figure 14.5. Definition of Ad Filtering Rule — Using regular expressions

If the Use regular expressions instead of wildcard characters is enabled, the WWW server and the Path on server entries must be defined using regular expressions (POSIX standard). Regular expressions can be used to specify any string using special symbols:

A few basic characters are usually sufficient for Web server and Web object definitions:

  • . (dot) — represents any character in a string.

  • * (asterisk) — represents any number (even zero) of repetition of the previous symbol.

    Example: The .* expression represents any number of characters.

  • \ (backslash) — is used for specification of a character which is used as a special symbol in the regular expression.

    Example: The \. expression represents the “dot” character.

Example (refer to the screenshot):

  • The Server Part item is defined by the .*ad\.anything\..* expression.

    This expression means that server name must include the ad.anything. string — i.e. ad.anything.net, 1ad.anything.com, img.ad.anything.cx, etc.

  • The Local Part is defined by the .*/img/.* expression.

    This implies that relative address of the object must include the /img/ string — i.e. /img/banner.gif, /data/img/bar.jpg or /img/.

For detailed information on regular expressions go to: