url filtering
1 Create a class-map (class map) to identify transmission traffic.
The first network segment of the intranet
Second definition of regular expression, determine the (domain name) keyword contained in the URL
Third check the IP message header , whether it is http traffic
2 Create policy-map (policy map), associate class-map
either allow this link
or discard this link
Usually the policy is applied to the inside (inbound) interface
Only one policy mapping can be applied to an interface
3 Apply class-map to the interface.
-------------------------------------------------- ----------------------------------------
//Define ACL access control list aclfile//
access-list aclfile extended permit tcp 192.168.100.0 255.255.255.0 any eq www
Establish class mapping aclclass
class -map aclclass
match access-list aclfile //Match access control list//
//Define regular expressions to specify websites that need to be filtered and are not allowed to be accessed//
regex url "\.accp\.com" //*Be careful not to write the slash backwards*//
Create a class mapping urlclass
class-map type regex match-any urlclass
match regex url // call matching regular expression //
httpclass // Create a category mapping for checking traffic //
## Class-Map Type Inspect httpclass #match request header host regex class urlclass //Call the previously configured urlclass1//----------------------- -------------------------------------------------- ----------------policy-map type inspect http httppolicy //Create policy mapping //class httpclass using use using use ’ use ’s ’ s ’ s ‐ ‐ ‐‐ ‐‐ ‐ //Create policy mapping //class httpclass //Call the inspection that has been done Class mapping of http header //drop-connection log use using using using ‐ ‐ ‐ ’ ’ ’ ’ ’ ‐ ‐ ‐ ‐ ‐ ‐ o ###### Class ACLCLASS // Call the class mapping of the access control list // ###### stect http httppolicy // Check the defined strategic mapping // ##### Service-Policy Insidepolicy Interface INSS IDE //Apply on port//###The above is the detailed content of How to do URL filtering. For more information, please follow other related articles on the PHP Chinese website!