380
Configuration procedure
# Configure IP addresses for the interfaces. (Omitted)
# Configure the NAT policy for the outbound interface.
<Router> system-view
[Router] acl number 2200
[Router-acl-basic-2200] rule 0 permit source 192.168.1.0 0.0.0.255
[Router-acl-basic-2200] rule 1 deny source any
[Router-acl-basic-2200] quit
[Router] nat address-group 1 2.2.2.10 2.2.2.11
[Router] interface gigabitethernet 1/0/1
[Router-GigabitEthernet1/0/1] nat outbound 2200 address-group 1
[Router-GigabitEthernet1/0/1] quit
# Enable the URL address filtering function.
[Router] firewall http url-filter host enable
# Specify to allow users to access only www.webfit.com, and set the default filtering action to
deny
.
[Router] firewall http url-filter host url-address permit www.webflt.com
[Router] firewall http url-filter host default deny
# Specify an ACL for URL address filtering.
[Router] acl number 2000
[Router-acl-basic-2000] rule 0 permit source 3.3.3.3 0.0.0.0
[Router-acl-basic-2000] rule 1 deny source any
[Router-acl-basic-2000] quit
# Specify to allow users to use IP addresses to access websites.
[Router] firewall http url-filter host ip-address deny
[Router] firewall http url-filter host acl 2000
After the above configuration, open a web browser on a host in the LAN, enter website
http://www.webflt.com or http://3.3.3.3, and access this website normally. If you enter other website
addresses, you are not allowed to access the corresponding websites.
# Display detailed information about URL address filtering.
[Router] display firewall http url-filter host verbose
URL-filter host is enabled.
Default method: deny.
The support for IP address: deny.
The configured ACL group is 2000.
There are 1 packet(s) being filtered.
There are 1 packet(s) being passed.
# Display URL address filtering information about all filtering entries.
[Router] display firewall http url-filter host all
SN Match-Times Keywords
------------------------------------
1 1 www.webflt.com