Supported Platforms
Related Documentation
- J, SRX Series
- Antispam Filtering Overview
- Understanding Server-Based Antispam Filtering
- Server-Based Antispam Filtering Configuration Overview
- Understanding Local List Antispam Filtering
- Local List Antispam Filtering Configuration Overview
- Handling Spam Messages
- spam-action
- Additional Information
- UTM Antispam Filtering Feature Guide for Security Devices
Example: Configuring Server-Based Antispam Filtering
This example shows how to configure server-based antispam filtering.
Requirements
Before you begin, review how to configure the feature parameters for each UTM feature. See Server-Based Antispam Filtering Configuration Overview.
Overview
Server-based antispam filtering requires Internet connectivity with the spam block list (SBL) server. Domain Name Service (DNS) is required to access the SBL server.
Configuration
CLI Quick Configuration
To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.
GUI Step-by-Step Procedure
To configure server-based antispam filtering:
- Configure a profile and enable/disable the SBL server
lookup. Select Configure>Security>UTM>Anti-Spam.
- In the Anti-Spam profiles configuration window, click Add to configure a profile for the SBL server, or click Edit to modify an existing item.
- In the Profile name box, enter a unique name for the antispam profile that you are creating.
- If you are using the default server, select Yes next to Default SBL server. If you are not using the default server,
select No.
Note: The SBL server is predefined on the device. The device comes preconfigured with the name and address of the SBL server. If you do not select Yes, you are disabling server-based spam filtering. You should disable it only if you are using only local lists or if you do not have a license for server-based spam filtering.
- In the Custom tag string box, enter a custom string for identifying a message as spam. By default, the devices uses ***SPAM***.
- From the antispam action list, select the action that the device should take when it detects spam. Options include Tag subject, Block email, and Tag header.
- Configure a UTM policy for SMTP to which you attach the
antispam profile.
- Select Configure>Security>Policy>UTM Policies.
- In the UTM policy configuration window, click Add.
- In the policy configuration window, select the Main tab.
- In the Policy name box, type a unique name for the UTM policy.
- In the Session per client limit box, type a session per client limit. Valid values range from 0 to 2000.
- From the Session per client over limit list, select the action that the device should take when the session per client limit for this UTM policy is exceeded. Options include Log and permit and Block.
- Select the Anti-Spam profiles tab in the pop-up window.
- From the SMTP profile list, select an antispam profile to attach to this UTM policy.
- Attach the UTM policy to a security policy.
- Select Configure>Security>Policy>FW Policies.
- In the Security Policy window, click Add to configure a security policy with UTM or click Edit to modify an existing policy.
- In the Policy tab, type a name in the Policy Name box.
- Next to From Zone, select a zone from the list.
- Next to To Zone, select a zone from the list.
- Choose a source address.
- Choose a destination address.
- Choose an application by selecting junos-smtp (for antispam) in the Application Sets box and move it to the Matched box.
- Next to Policy Action, select one of the following: Permit, Deny, or Reject.
Note: When you select Permit for Policy Action, several additional fields become available in the Applications Services tab, including UTM Policy.
- Select the Application Services tab.
- Next to UTM Policy, select the appropriate policy from the list. This attaches your UTM policy to the security policy.
- Click OK to check your configuration and save it as a candidate configuration.
- If the policy is saved successfully, you receive a confirmation,
and you must click OK again. If the profile is not saved
successfully, click Details in the pop-up window to discover
why.
Note:
- You must activate your new policy to apply it.
- In SRX Series devices the confirmation window that notifies you that the policy is saved successfully, disappears automatically.
- If you are done configuring the device, click Commit Options>Commit.
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode.
To configure server-based antispam filtering:
- Create a profile.[edit security]user@host# set utm feature-profile anti-spam sbl profile sblprofile1
- Enable or disable the default SBL server lookup.[edit security]user@host# set utm feature-profile anti-spam sbl profile sblprofile1 sbl-default-server
Note: If you are using server-based antispam filtering, you should type sbl-default-server to enable the default SBL server. (The SBL server is predefined on the device. The device comes preconfigured with the name and address of the SBL server.) You should disable server-based antispam filtering using the no-sbl-default-server option only if you are using only local lists or if you do not have a license for server-based spam filtering.
- Configure the action to be taken by the device when spam
is detected (block, tag-header, or tag-subject).[edit security]user@host# set utm feature-profile anti-spam sbl profile sblprofile1sbl-default-server spam-action block
- Configure a custom string for identifying a message as
spam.[edit security]user@host# set utm feature-profile anti-spam sbl profile sblprofile1 sbl-default-server custom-tag-string ***spam***
- Attach the spam feature profile to the UTM policy.[edit security]user@host# set utm utm-policy spampolicy1 anti-spam smtp-profile sblprofile1
- Configure a security policy for UTM to which to attach
the UTM policy. [edit]user@host# set security policies from-zone trust to-zone untrust policy utmsecuritypolicy1 match source-address anyuser@host# set security policies from-zone trust to-zone untrust policy utmsecuritypolicy1 match destination-address any user@host# set security policies from-zone trust to-zone untrust policy utmsecuritypolicy1 match application junos-smtp user@host# set security policies from-zone trust to-zone untrust policy utmsecuritypolicy1 then permit application-services utm-policy spampolicy1
Note: The device comes preconfigured with a default antispam policy. The policy is called junos-as-defaults. It contains the following configuration parameters:
anti-spam { sbl { profile junos-as-defaults { sbl-default-server; spam-action block; custom-tag-string "***SPAM***"; }}}
Results
From configuration mode, confirm your configuration by entering the show security utm and show security policies commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
If you are done configuring the device, enter commit from configuration mode.
Verification
To confirm that the configuration is working properly, perform this task:
Verifying Antispam Statistics
Purpose
Verify the antispam statistics.
Action
From operational mode, enter the show security utm anti-spam status and show security utm anti-spam statistics commands.
The following information appears:
Related Documentation
- J, SRX Series
- Antispam Filtering Overview
- Understanding Server-Based Antispam Filtering
- Server-Based Antispam Filtering Configuration Overview
- Understanding Local List Antispam Filtering
- Local List Antispam Filtering Configuration Overview
- Handling Spam Messages
- spam-action
- Additional Information
- UTM Antispam Filtering Feature Guide for Security Devices
Modified: 2016-06-26
Supported Platforms
Related Documentation
- J, SRX Series
- Antispam Filtering Overview
- Understanding Server-Based Antispam Filtering
- Server-Based Antispam Filtering Configuration Overview
- Understanding Local List Antispam Filtering
- Local List Antispam Filtering Configuration Overview
- Handling Spam Messages
- spam-action
- Additional Information
- UTM Antispam Filtering Feature Guide for Security Devices