You can use wildcards to represent characters for some values in firewall rules. Wildcards match zero or more characters so that you don't have to specify an entire path or value, or set of values.
Firewall supports wildcards in blocked domains and executable paths only.
For paths of files, registry keys, executables, and URLs, use these wildcards.
Note
Registry key paths for firewall group locations don't recognize wildcard values.
? | Question mark | A single character. This wildcard applies only if the number of characters matches the length of the file or folder name. For example: The exclusion W?? excludes WWW, but doesn't exclude WW or WWWW. |
* | Asterisk | Multiple characters, excluding slash (/) and backslash (\). Use this character to match the root-level contents of a folder with no subfolders.
|
** | Double asterisk | Multiple characters, including slash (/) and backslash (\). This wildcard matches zero or more characters. For example: C:\ABC\**\XYZ matches C:\ABC\DEF\XYZ and C:\ABC\XYZ. |
| | Pipe | Wildcard escape.
|
Note
Wildcards can appear in front of a backslash (\) in a path. For example, C:\ABC\*\XYZ matches C:\ABC\DEF\XYZ.
For values that normally don't contain path information with slashes, use these wildcards.
? | Question mark | A single character. |
* | Asterisk | Multiple characters, including slash (/) and backslash (\). |
| | Pipe | Wildcard escape. |
Wildcard examples
DNS Blocking feature- Use wildcards to match domain names and subdomains names.
*.domain.com |
*domain.com |
*subdomain.domain.com |
*.subdomain.domain.com |
Executable file path criteria- Trusted Executables, Firewall Rule Executables, and Firewall Group Executables.
When defining executables in the firewall configuration rules/groups, use executable file extensions such as .exe, .com, etc.
Note
Wildcards can’t be used in FQDN (fully qualified domain name) values, both in local and remote network. They are also restricted for usage in executable file descriptions, hash and signer details.
Example | Description |
|---|---|
**\Temp\test.exe | Defines a specific executable file in a folder named Temp anywhere on the system. |
**\test.exe | Defines a specific executable file anywhere on the system. |
\**\test.exe | Defines a specific executable file in any folder on a specific drive. |
C:\Users\*\Desktop\test.exe | Define a specific executable file on any user's profile Desktop directory. |
C:\Program Files*\test.exe | Define a specific executable file to run from either the \Program Files or \Program Files (x86)\ directories. |
**\test*.exe | Define a specific executable file to run if the filename starts with "test" |
**\test?.exe | Define a specific executable file to run if the filename matches testX.com, where X is any valid character for a file name |
C:\Program Files\Test\* | Define an executable match for all executables in a specific directory. |
C:\Program Files\Test\** | Define an executable match for all executables in a specific directory and all sub-directories. |