Manual Chapter :
Securing SMTP Traffic
Applies To:
Show VersionsBIG-IP ASM
- 17.1.2, 17.1.1, 17.1.0, 17.0.0
Securing SMTP Traffic
Overview: Securing SMTP traffic using system defaults
This implementation describes how to secure SMTP traffic using system defaults. When you create
an SMTP security profile, the BIG-IP
Advanced Firewall Manager™ (AFM) provides several security checks for
requests sent to a protected SMTP server. When you enable a security check, the system either
generates an alarm for, or blocks, any requests that trigger the security check.
You can configure the SMTP security profile to include the following checks:
- Verify SMTP protocol compliance, as defined in RFC 2821.
- Validate incoming mail using several criteria.
- Inspect email and attachments for viruses.
- Apply rate limits to the number of messages.
- Validate DNS SPF records.
- Prevent directory harvesting attacks.
- Disallow or allow some of the SMTP methods, such as VRFY, EXPN, and ETRN, that spam senders typically use to attack mail servers.
- Reject the first message from a sender, because legitimate senders retry sending the message, and spam senders typically do not. This process is known asgreylisting. The system does not reject subsequent messages from the same sender to the same recipient.
Task Summary
Creating an SMTP service profile with security enabled
The easiest method for initiating SMTP protocol security for your SMTP virtual
server traffic is to use the system default settings. You do this by enabling protocol
security for the system-supplied SMTP service profile, and then associating that service
profile with a virtual server.
- On the Main tab, click.The SMTP profile list screen opens.
- In theNamecolumn, clicksmtp.The Properties screen for the system-supplied SMTP profile opens.
- Select theProtocol Securitycheck box to enable SMTP security checks.
- ClickUpdate.
You now have a security-enabled service profile that you can associate with a virtual
server so that SMTP protocol checks are performed on the traffic that the SMTP virtual
server receives.
Creating an SMTP virtual server with protocol security
When you enable protocol security for an SMTP virtual server, the system scans any
incoming SMTP traffic for vulnerabilities before the traffic reaches the SMTP servers.
- On the Main tab, click.The Virtual Server List screen opens.
- ClickCreate.The New Virtual Server screen opens.
- In theNamefield, type a unique name for the virtual server.
- For theDestination Address/Masksetting, confirm that theHostbutton is selected, and type the IP address in CIDR format.The supported format is address/prefix, where the prefix length is in bits. For example, an IPv4 address/prefix is10.0.0.1or10.0.0.0/24, and an IPv6 address/prefix isffe1::0020/64or2001:ed8:77b5:2:10:10:100:42/64. When you use an IPv4 address without specifying a prefix, the BIG-IP system automatically uses a/32prefix.The IP address you type must be available and not in the loopback network.
- In theService Portfield, type25or selectSMTPfrom the list.
- In the Configuration area, for theSMTP Profilesetting, select the default profile,smtp.
- From theSource Address Translationlist, selectAuto Map.
- For theDefault Poolsetting, either select an existing pool from the list, or click the Create (+) button and create a new pool.
- ClickFinished.
The custom SMTP virtual server appears in the Virtual Servers list.
Review violation statistics for security profiles
You can view statistics and transaction information for each security profile that
triggers security violations.
- On the Main tab, clickand clickHTTP,DNS, orSIP.The appropriate statistics screen opens listing all violations for that protocol, with the number of occurrences.
- Type a Support ID, if you have one, to filter the violations and view one in particular.
- Click a violation's hyperlink to see details about the requests causing the violation.On the Statistics screen, in the left column, you can review information regarding the traffic volume for each security profile configured.
Overview: Creating a custom SMTP security profile
This implementation describes how to secure SMTP traffic. When you create an SMTP security
profile, the system provides several security checks for requests sent to a protected SMTP
server. When you enable a security check, the system either generates an alarm for, or blocks,
any requests that trigger the security check.
You can configure the SMTP security profile to include the following checks:
- Verify SMTP protocol compliance as defined in RFC 2821.
- Validate incoming mail using several criteria.
- Inspect email and attachments for viruses.
- Apply rate limits to the number of messages.
- Validate DNS SPF records.
- Prevent directory harvesting attacks.
- Disallow or allow some of the SMTP methods, such as VRFY, EXPN, and ETRN, that spam senders typically use to attack mail servers.
- Reject the first message from a sender, because legitimate senders retry sending the message, and spam senders typically do not. This process is known asgreylisting. The system does not reject subsequent messages from the same sender to the same recipient.
Task summary
Creating a custom SMTP service profile
You create an SMTP service profile optimized for security when you want to fine-tune the way that the BIG-IPsystem scans SMTP traffic for vulnerabilities.
- On the Main tab, click.The SMTP profile list screen opens.
- ClickCreate.The New SMTP Profile screen opens.
- In theNamefield, type a unique name for the profile.
- From theParent Profilelist, select the existing SMTP profile from which you want the new profile to inherit settings. The default issmtp.
- Select theCustomcheck box.
- Select theProtocol Securitycheck box to enable SMTP security checks.
- ClickFinished.
The custom SMTP service profile now appears in the SMTP list screen.
Creating a security profile for SMTP traffic
The SMTP security profile provides security checks that are applicable to the SMTP
protocol.
- On the Main tab, click.The Security Profiles: SMTP screen opens.
- Click theCreatebutton.The New SMTP Security Profile screen opens.
- In theProfile Namefield, type a unique name for the profile.
- In the Defense Configuration area, selectAlarmorBlockfor the SMTP defenses you want to activate.OptionDescriptionAlarmThe system logs any requests that trigger the violation.BlockThe system blocks any requests that trigger the violation.AlarmandBlockThe system both logs and blocks any requests that trigger the violation.
- ClickCreate.The screen refreshes, and you see the new security profile in the list.
The BIG-IP system automatically assigns this service profile
to SMTP traffic that a designated virtual server receives.
Enabling anti-virus protection for email
You can warn or block against email attachments containing a suspected virus. To
do this, you configure the Application Security Manager to act as
an ICAP client, and make sure that the SMTP profile has anti-virus options selected.
This prompts an external ICAP server to inspect email and email attachments for viruses
before releasing the content to the SMTP server.
- On the Main tab, click.The Anti-Virus Protection screen opens.
- For theServer Host Name/IP Addresssetting, type the fully qualified domain name of the ICAP server, or its IP address.If you specify the host name, you must first configure a DNS server by selecting.
- ForServer Port Number, type the port number of the ICAP server.The default value is1344.
- If you want to perform virus checking even if it may slow down the web application, select theGuarantee Enforcementcheck box.
- ClickSave.
- On the Main tab, click.The Advanced Configuration screen opens.
- In the System Variables area, ensure that the values for theicap_uri(URI for the ICAP service), andvirus_header_name(header name used) internal parameters correspond to your ICAP server's settings.By default, the system supports an ICAP server with McAfee anti-virus protection. If your organization uses a different ICAP server, update the parameters and save your changes.ICAP Servericap_uri ValueMcAfee VirusScan/REQMODTrend Micro InterScan Web Security/reqmodKaspersky/av/reqmodSymantec/symcscanreq-av-urlICAP Servervirus_header_name ValueMcAfee VirusScanX-Infection-Found,X-Virus-NameTrend Micro InterScan Web SecurityX-Virus-IDKasperskyX-Virus-IDSymantecX-Violations-Found
- On the Main tab, click.The Security Profiles: SMTP screen opens.
- Click an existing SMTP security profile name or create a new one.The (New) SMTP Profile Properties screen opens.
- For theVirus Detectionsetting, select theAlarmorBlockoptions as required.OptionDescriptionAlarmThe system logs any requests that trigger the virus detected violation, and displays them on the Protocol Security statistics screen.BlockThe system blocks any email requests that trigger the virus detected violation.AlarmandBlockThe system both logs and blocks any requests that trigger the virus detected violation.
- ClickCreateto create a new profile, orUpdateto update an existing one.
All incoming email attachments will be inspected for viruses.
Modifying associations between service profiles and security profiles
Before you can modify associations between service profiles and security profiles,
you must have created at least one security profile.
When you enable the
Protocol Security
setting on an FTP,
HTTP, or SMTP service profile, the system automatically assigns the first-listed
security profile to the service profile you configured for that profile. You can review
and modify the current associations between the service profiles and the security
profiles for each protocol. - On the Main tab, click.The Profiles Assignment screen opens.
- From the Profiles Assignment menu, select the service profile type.
- For each traffic profile, select the protocol security profile to use from the list in the Assigned Security Profile column.
- ClickSave.
Creating and securing an SMTP virtual server and pool
Configure a virtual server and a default pool for your network's SMTP servers, and
assign the custom SMTP service profile. When the virtual server receives SMTP traffic,
the SMTP security profile created in Application Security Manager
scans for security vulnerabilities, and then the virtual server can be configured to
perform other actions (such as load balancing) on traffic that passes the
scan.
- On the Main tab, click.The Virtual Server List screen opens.
- ClickCreate.The New Virtual Server screen opens.
- In theNamefield, type a unique name for the virtual server.
- In theDestination Address/Maskfield, type an address, as appropriate for your network.The supported format is address/prefix, where the prefix length is in bits. For example, an IPv4 address/prefix is10.0.0.1or10.0.0.0/24, and an IPv6 address/prefix isffe1::0020/64or2001:ed8:77b5:2:10:10:100:42/64. When you use an IPv4 address without specifying a prefix, the BIG-IP system automatically uses a/32prefix.
- In theService Portfield, type25or selectSMTPfrom the list.
- From theConfigurationlist, selectAdvanced.
- From theSMTP Profilelist, select the custom SMTP profile that you created.
- From theSource Address Translationlist, selectAuto Map.
- In the Resources area of the screen, for theDefault Poolsetting, click theCreate (+)button.The New Pool screen opens.
- In theNamefield, type a unique name for the pool.
- In the Resources area, for theNew Memberssetting, select the type of new member you are adding, then type the information in the appropriate fields, and clickAddto add as many pool members as you need.
- ClickFinishedto create the pool.The screen refreshes, and reopens the New Virtual Server screen. The new pool name appears in theDefault Poollist.
- ClickFinished.
The custom SMTP virtual server appears in the Virtual Servers list.
Review violation statistics for security profiles
You can view statistics and transaction information for each security profile that
triggers security violations.
- On the Main tab, clickand clickHTTP,DNS, orSIP.The appropriate statistics screen opens listing all violations for that protocol, with the number of occurrences.
- Type a Support ID, if you have one, to filter the violations and view one in particular.
- Click a violation's hyperlink to see details about the requests causing the violation.On the Statistics screen, in the left column, you can review information regarding the traffic volume for each security profile configured.