There are many use cases where an EPM administrator would want to prevent a script or script type from accessing the internet, while still being allowed to run normally in the user environment.One such use case example is malware trying to reach the internet.Here are the steps to create a policy to block these scripts from accessing the internet, and also how to allow specific scripts through the block.
Steps
You can create an 'Allow' Advanced Policy for Application Definition Type 'Script' that will not allow the script to access the internet by following these steps:
- Open the EPM Set Console for the set you are working with.
- Click on ‘Policies’ from the list on the left side of the screen.
- In the Policies dropdown list, make sure that Application policies is selected (default), then click the ‘Create advanced policy’ button in the upper right corner of the screen. This will open the ‘Create advanced application policy’ wizard.
- Select the correct platform.
- Select the Action ‘Allow’.
- Click the ‘Continue’ button.
- Name your policy.
- Under ‘Scope’ click the ‘Add definition’ button.
- Change the definition type to ‘Script’.
- After the Property ‘Filename’ choose ‘Contains’ from the dropdown.
- Put the value .js (only used as an example of the script type).
- Delete the other Properties by clicking on the trash can symbol next to them.
- Select ‘Include child processes’ under ‘Options’ if that applies.
- Click the ‘Done’ button.
- Scroll down the page to the ‘Options’ section and expand ‘Application access control’.
- Turn ‘Application access control’ to On.
- Edit ‘Online resources’.
- This will open the ‘Online resources’ portion of the Wizard.
- Click the ‘…’ button next to ‘Internet’ and select ‘Edit’.
- Select ‘Restrict’ and click the ‘Ok’ button.
- Click the ‘Done’ button.
- Click the ‘Create’ button.
Please be aware that if you made the policy a wildcard this will affect all .js scripts (or whatever script type you chose) in the set and you should definitely test this before you implement it in your production environment.
For scripts that you need to override this policy and access the internet, you can write a similar policy for that specific script giving it the permissions you need, and raise the policy priority over that of the script preventing access to the internet.