IOS IPS Best Practices
IOS IPS Best Practices
Presentation_ID
Cisco Confidential
Presentation_ID
Cisco Confidential
Presentation_ID
Cisco Confidential
Presentation_ID
Cisco Confidential
-Process= "Exec", ipl= 0, pid= 3, -Traceback= 0x4164F41C 0x400AEF1C 0x400B4D58 0x400B52C4 0x400C102C 0x400C0820 0x400C23EC 0x400C0484 0x424C1DEC 0x424C2A4C 0x424C2FF0 0x424C31A0 0x430D6ECC 0x430D7864 0x430F0210 0x430FA0E8 *Mar 18 07:09:36.911: %SYS-2-CHUNKEXPANDFAIL: Could not expand chunk pool for regex. No memory available -Process= "Chunk Manager", ipl= 3, pid= 1, -Traceback= 0x4164F41C 0x400C06FC *Mar 18 07:09:37.115: %IPS-4-SIGNATURE_COMPILE_FAILURE: service-http 12024:0 - compilation of regular expression failed *Mar 18 07:09:41.535: %IPS-4-SIGNATURE_COMPILE_FAILURE: service-http 5280:0 - compilation of regular expression failed *Mar 18 07:09:44.955: %IPS-4-SIGNATURE_COMPILE_FAILURE: service-http 5284:0 - compilation of regular expression failed *Mar 18 07:09:44.979: %IPS-4-SIGNATURE_COMPILE_FAILURE: service-http 12023:0 - compiles discontinued for this engine
Presentation_ID 2007 Cisco Systems, Inc. All rights reserved. Cisco Confidential
Dealing with Memory Allocation Errors When Compiling Signatures Best Practice
The pre-defined IOS IPS Basic and Advanced signature categories contain optimum combination of signatures for all standard memory configurations, providing a good starting point Never unretire the all category For routers with 128MB memory, start with the IOS IPS Basic category For routers with 256MB memory, start with the IOS IPS Advanced category Then customize the signature set by unretiring/retiring few signatures at a time according to your network needs Pay attention to the free memory every time after you unretiring/retiring signatures
Presentation_ID 2007 Cisco Systems, Inc. All rights reserved. Cisco Confidential
When router free memory drops below 10% of the total installed memory, then stop unretiring signatures
Presentation_ID
Cisco Confidential
Retire signatures not supported by IOS IPS and signatures not applicable to your network to save memory
Presentation_ID 2007 Cisco Systems, Inc. All rights reserved. Cisco Confidential
10
Configuration Steps
Follow the steps in the following order for initial Cisco IOS IPS configuration:
Step 1: Download IOS IPS signature package to PC Step 2: Create IOS IPS configuration directory Step 3: Configure IOS IPS crypto key Step 4: Create IOS IPS policy and apply to interface(s) Remember to FIRST retire the all category Step 5: Load IOS IPS signature package
11
Presentation_ID
Cisco Confidential
12
Dealing with IOS IPS Policy Applied at the Wrong Direction/InterfaceIncorrect Configuration
Protecting Attacks from Inside
Inside Outside
Case A: Issue
Head Office
Branch Office
Worms FE0/0 FE0/1 Web Clusters Internet Traffic IPSec Tunnel Cisco 28xx Internet Interface FastEthernet0/0 Branch Office PCs/Laptops ip ips ips-policy out Policy applied to the wrong direction Head Office PCs Application Servers
Cisco 18xx
Presentation_ID
Cisco Confidential
13
Case A: Solution
Head Office
Branch Office
Worms FE0/0 FE0/1 Web Clusters Internet Traffic IPSec Tunnel Cisco 28xx Internet Interface FastEthernet0/0 Branch Office PCs/Laptops ip ips ips-policy in Policy applied to the right direction Head Office PCs Application Servers
Cisco 18xx
Presentation_ID
Cisco Confidential
14
Dealing with IOS IPS Policy Applied at the Wrong Direction/InterfaceIncorrect Configuration Protecting Attacks from Outside
Case B: Issue
attacks
Inside Outside
Head Office
Branch Office
FE0/0 FE0/1 Web Clusters Internet Traffic IPSec Tunnel Cisco 28xx Internet DMZ Interface FastEthernet0/1 Branch Office PCs/Laptops ip ips ips-policy out Policy applied to the wrong direction Head Office PCs Application Servers
Cisco 18xx
Presentation_ID
Cisco Confidential
15
Case B: Solution
attacks
Inside Outside
Head Office
Branch Office
FE0/0 FE0/1 Web Clusters Internet Traffic IPSec Tunnel Cisco 28xx Internet DMZ Interface FastEthernet0/1 Branch Office PCs/Laptops ip ips ips-policy in Policy applied to the right direction Head Office PCs Application Servers
Cisco 18xx
Presentation_ID
Cisco Confidential
16
Presentation_ID
Cisco Confidential
17
Presentation_ID
Cisco Confidential
Dealing with Packet/Connections dropped due to packets arriving out of order Resolution
FW Drops Out-of-Order Packet Slows Down Network Traffic
IPS requires packets arrive in order to perform signature scanning, thus drops out -of-order packet; this is one of the reasons for slow response and longer latency in network traffic IOS IPS supports Out-of-Order packet starting from 12.4(9)T2 and later 12.4T releases Not fixed in 12.4 mainline releases Out-of-Order fix also applies to application firewall Out-of-order fix DOES NOT work when IOS IPS interface is included in a Zone -Based FW zone Out-of-order fix works between IOS IPS and Classic IOS FW (ip inspect) If using a release that does not have the fix, workaround is to use ACL to bypass IOS IPS inspection for the traffic flow in question
router(config)#access-list 120 deny ip any host 199.200.9.1 router(config)#access-list 120 deny ip host 199.200.9.1 any router(config)#access-list 120 permit ip any any router(config)#ip ips name myips list 120
In the example, ACL 120 denies traffic and remove the traffic from IPS scanning; the network traffic between the two site do not experience slow response
Presentation_ID 2007 Cisco Systems, Inc. All rights reserved. Cisco Confidential
19
Never unretire the all signature category For routers with 128MB memory, start with the IOS IPS Basic category For routers with 256MB or more memory, start with the IOS IPS Advanced category
Presentation_ID
Cisco Confidential
20
21