Overview & Background

This blog is focused on the Cisco ASA 5500 Series Security Appliance. I have been working with Cisco products since their routers had IOS 11.0. The intention of this blog is to share technical information, tutorials, tips and configuration examples in a simple "how to" manner.

The Cisco ASA is the descendant of the older Cisco PIX series firewall which became part of Cisco's portfolio when they acquired Network Translation in 1995. In 2005, Cisco introduced the ASA which combined functionality of the PIX, VPN Concentrator, and IPS Product lines. Through PIX OS release 7.x (codenamed finesse) the PIX and the ASA used the same software images. Beginning with PIX OS version 8.x, the operating system code diverges, with the ASA using a Linux kernel.


Friday, February 19, 2010

Using the ASA to filter URLs


! ACLs will identify the protocol and port of the packets your filter will be checking
! This example is to block domains so www and https packets will be checked
!
access-list BLOCK_HTTPDOMAINS remark Defines packets to be checked in filter
access-list BLOCK_HTTPDOMAINS extended permit tcp any any eq www
access-list BLOCK_HTTPDOMAINS extended permit tcp any any eq https
!
! Individual named regex entries will define each separate domain to be filtered
!
regex DOMAIN01 "\.facebook\.com"
regex DOMAIN02 "\.myspace\.com"
regex DOMAIN03 "\.twitter\.com"
!
! Assign the ACL packet definition to a class map
!
class-map BLOCKHTTP_CLASS
  match access-list BLOCK_HTTPDOMAINS
!
! Define a class map to contain regex entries, with match any
!
class-map type regex match-any DOMAINBLOCK_LIST
  match regex DOMAIN01
  match regex DOMAIN02
  match regex DOMAIN03
!
! New class map with nested regex class map that defines the type 'inspect'
!
class-map type inspect http match-all DOMAINBLOCK_CLASS
  match request header host regex class DOMAINBLOCK_LIST
!
policy-map type inspect http HTTP_INSPECT_POLICY
  match request method connect
    drop-connection log
  class DOMAINBLOCK_CLASS
    reset log
!
! Nested policy maps
!
policy-map INSIDE_POLICY
  class BLOCKHTTP_CLASS
    inspect http HTTP_INSPECT_POLICY
!
! Apply to either the global policy or a specific inside policy (this example)
!
service-policy INSIDE_POLICY interface INSIDE
!

0 comments:

Post a Comment