File content policies contain a list of policy rules that are evaluated from top to bottom. The action set in the first matching policy rule is executed. You must include at least one of the following criteria and define if the criteria are combined with a Boolean AND or OR. Empty criteria are ignored.
- Content Type – You can add file types by category or individually.
File Name patterns – Pattern matching the file name.
MIME Type patterns – Pattern matching the MIME type patterns for HTTP and SMTP. If a MIME type pattern is configured, HTTP, SMTP, and FTP connections that do not include a MIME type will cause the file content policy rule to not match if used with a Boolean AND.
Create a File Content Policy Object
- Go to CONFIGURATION > Configuration Tree > Box > Assigned Services > Firewall > Forwarding Rules.
- Click Lock.
- From the left menu, select File Content.
- Right-click the table and select New File Content Policy. The Edit File Content Policy Object window opens.
- Enter a Name.
- Select the default policy:
- Allow
- Alert
- Do not log
- Click + to add a File Content Policy Rule.
- Double-click the new file content policy rule. The Edit File Content Policy Rule windows opens.
- (optional) Select the logic operator how the matching criteria are combined: AND or OR. Default: OR.
- (optional) Change the QoS Band.
- Select the policy for the File Content Policy rule. For more information, see File Content Filtering in the Firewall.
- Allow – allow and log (logfile and Barracuda Firewall Admin)
- Block – block and log (logfile and Barracuda Firewall Admin)
- Alert – allow and show in Firewall Monitor only.
- Do not log – allow and do not log.
- Allow – allow and log (logfile and Barracuda Firewall Admin)
- Configure at least one of the following:
- Content Type – Use the filter to find the content type and double-click the entry to add it to the Selected Content Types section.
- File Name Pattern – In the File Name Patterns section, click + to add one or more file name patterns. File name patterns may contain * and ? wildcard characters.
MIME Type Pattern – In the Mime Types Patterns section, click + to add one or more MIME type patterns. MIME type patterns may contain * and ? wildcard characters.
- Content Type – Use the filter to find the content type and double-click the entry to add it to the Selected Content Types section.
- Click Save.
- (optional) Add additional File Content Policy Rules.
- Use the up and down arrows () to sort the policy rules so that the policy rule that should match first is on top.
- Click Save.
- Click Send Changes and Activate.
To use the file content policy in an application rule, see How to Configure File Content Filtering in the Firewall.