Return to FAQ List
FAQ 106: Use regular expressions in BlockedKeywordsFileCategory: BlockedIP function
DNS Redirector v7 allows for regular expressions (also referred to as regex or regexp) in any keyword list.
All keyword lists need to have at least one non-regex keyword present; that's at least 1 line not starting with ^
A helpful site for understanding regex is: www.regular-expressions.info
Using the regex...
would block domains like...
which is more efficient than using plain keywords for each ad server you wish to block.
Using the regex...
would block any domains ending in China's county code: .cn
which is more efficient then using plain keywords for each .cn site you wish to block.
You can greatly improve network security by using regex statements in DNS Redirector to block the following...
- Vanity TLD's since there's lots of fraud in this namespace
A list of all TLDs can be found here: IANA or here: Hurricane Electric.
Additional explanation found here, or see the new TLD statistics.
Also statistics on fraud here and here.
- IDN's that are not relevant to your business
For example: ^(.*\.)?xn--.* (to block all)
Also note: ^.*\.bycc2ii\.net$ (for Thailand, but this is not an ICANN-sanctioned IDN encoding method)
- IDN ccTLD or ccIDN's that are not relevant to your business
For example: ^.*\.xn--fiqs8s$ and: ^.*\.xn--fiqz9s$ (for China)
Or use: ^.*\.xn--.*$ (to block all)
- GeoTLD's that are not relevant to your business
- ccTLD's that are not relevant to your business
Note: Remove or comment out (by placing ; at the start of a line) your own country code and any others you want accessible.
- There are no English words with triple letters
and domains aiding or embedding badware sometimes contain 3 concurrent letters
Note: 3 letters may adversely block some acronyms, but you can always whitelist any domains you do want to visit, or consider 4 letters
Note: Exclude "www" because many websites still start with www. or "xxx" because this is already in the porn keywords list.
[ See a sample blocked file here: example-blocked-custom.txt ]
...the contents can be pasted into your blocked.txt file, or if using updater.exe to your blocked-custom.txt file.
FAQ 112 Use regular expressions in AllowedKeywordsFile
FAQ 114 Advert block list does not include some ccTLD's