To configure native file blocking, you create a policy and then configure it with a list of file extensions to block.
Before You Begin
Steps
- Create a file policy using the following CLI command:fpolicy create PolicyName Policytype
Example
To create a screening policy named .mp3blocker, enter the following command:fpolicy create .mp3blocker screen
FPolicy with the specified
policy name is created,
using the screen policy type.
- Set the operations and protocols monitored by the policy using the
following command:fpolicy monitor {add|remove|set} PolicyName
[-p protocols] [-f] op-spec
PolicyName is the name of the policy you want to add operations to.
protocols is the set of protocols you want to enable monitoring for. Use cifs to monitor CIFS requests, nfs to monitor NFS requests, or cifs,nfs to monitor both.
The -f option forces the policy to be enabled even if there are no servers available to enforce the policy.
op-spec is the list of operations you want to add.
Example
To replace the policy .mp3blocker's list of operations monitored
for CIFS and NFS operations, enter the following command:fpolicy monitor set .mp3blocker -p cifs,nfs
create,rename
Specify the create option to prevent creation of .mp3 files. In
addition, to ensure that an .mp3 file is not copied onto the storage
system with a different extension and renamed, also specify the
rename option.
This CLI command sets specific operations to be monitored.
- Set the required option to on, using the following command syntax:fpolicy options PolicyType
required on
This CLI command makes file screening mandatory before the files
can be accessed.
- Enable the FPolicy feature using the following CLI command:fpolicy enable PolicyType
[-f]
screen is the only PolicyType
available in FPolicy.
Example
To enable FPolicy .mp3blocker, enter the following
command:fpolicy enable .mp3blocker
This CLI command enables the file policy.