| 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. |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2026 Fortinet, Inc. All Rights Reserved.