Technical Tip: DLP regex for blocking Ontario OHIP card numbers
| Description | This article describes how to block Ontario OHIP card numbers using DLP local regex. |
| Scope | FortiGate. |
| Solution | Below regex pattern below can be used to block Ontario health card numbers:
config dlp dictionary set uuid 123444 set type "g-regex" set pattern "(?i:\\b[0-9]{4} [0-9]{3} [0-9]{3}[A-Z]{0,2}\\b)" set repeat enable next set type "g-regex" set pattern "(?i:\\b[0-9]{4}-[0-9]{3}-[0-9]{3}[A-Z]{0,2}\\b)" set repeat enable next set type "g-regex" set pattern "(?i:\\b[0-9]{10}[A-Z]{0,2}\\b)" set repeat enable next end next end
Note: If the sensor count value is set to 4, it will require 4 matches and trigger the DLP action.
Below is the dictionary 'regex' in the DLP sensor :
config dlp sensor
Now, put the sensor below in the DLP profile:
config dlp profile
The above DLP profile 'ontario-ohip' can be used in the Proxy base firewall policy to block the OHIP card numbers. |
