可以参考这个来做,这个是只能访问要求的几个网站和收发邮件,DHCP功能和DNS功能,其余的应用一概无法实现。
可以在这个基础上修改,但是这个配置上去,设备CPU基本就飚到100%了,还不能匹配https的报文,个人建议不要做
#
firewall
enable //一定要开启防火墙
#
acl number
3004 //定义acl 3004供防火墙使用
rule 0
permit tcp destination-port eq www //允许访问WWW服务
rule 5
permit udp destination-port eq dns //允许DNS服务
rule 10
permit tcp destination-port eq pop2
rule 15
permit tcp destination-port eq pop3 //允许邮件访问
rule 20
permit udp destination-port eq bootps //此协议为DHCP
rule 25
permit tcp destination-port eq smtp
rule 30
permit tcp destination-port eq 443
rule 100
deny ip //其余一概deny
#
traffic
classifier 2 operator or //通过流分类来定义不允许访问的网站
if-match
protocol http host *
if-match
protocol http url *
traffic
classifier 1 operator or //通过流分类来定义具体允许的网站
if-match
protocol http host 126
if-match
protocol http host 163
if-match
protocol http host 127 //访问163会自动有127的访问
if-match
protocol http host hotmail
if-match
protocol http host sina
if-match
protocol http host baidu
traffic
classifier urllimit-1 operator or
#
traffic
behavior behaviorforfilter
filter deny
traffic
behavior 2
filter deny
traffic
behavior 1
filter
permit
#
qos policy
1
classifier
1 behavior 1
classifier
2 behavior 2
#
interface
GigabitEthernet0/1
port
link-mode route
firewall
packet-filter 3004 outbound
nat
outbound
ip address
60.191.123.86 255.255.255.0
dar enable
qos apply
policy 1 outbound
暂无评论