All pastes #364086 Raw Edit

Stuff

public text v1 · immutable
#364086 ·published 2007-02-19 22:18 UTC
rendered paste body
From the site pertaining to URL matching with regex under http inspection:

hostname(config)# class-map type regex match-any url_to_log 
hostname(config-cmap)# match regex "www\.xyz.com/.*\.asp"
hostname(config-cmap)# match regex "www\.xyz[0-9][0-9]\.com"
hostname(config-cmap)# exit

hostname(config)# class-map type regex match-any methods_to_log 
hostname(config-cmap)# match regex "GET"
hostname(config-cmap)# match regex "PUT"
hostname(config-cmap)# exit

hostname(config)# class-map type http http_url_policy 
hostname(config-cmap)# match request url regex class url_to_log 
hostname(config-cmap)# match request method regex class methods_to_log 
hostname(config-cmap)# exit

hostname(config)# policy-map type http http_policy 
hostname(config-pmap)# class http_url_policy 
hostname(config-pmap-c)# log


Now from this ASA:

ciscoasa(config)# class-map type regex match-any url_to_log 
ciscoasa(config-cmap)# match regex "www\.xyz.com/.*\.asp"
ERROR: Specified regex 'www\.xyz.com/.*\.asp' does not exist.
ciscoasa(config-cmap)# regex TEST_REGEX "www\.xyz.com/.*\.asp"
ciscoasa(config)# class-map type regex match-any url_to_log 
ciscoasa(config-cmap)# match regex TEST_REGEX 
ciscoasa(config-cmap)# exit 
ciscoasa(config)# class-map type http http_url_policy
                                 ^
ERROR: % Invalid input detected at '^' marker.
ciscoasa(config)# class-map type ?

configure mode commands/options:
  inspect     Configure a class-map of type inspect
  management  Configure a class-map of type Management
  regex       Configure a class-map of type REGEX
ciscoasa(config)#