服务器区域网段为192.168.10.0/24,办公区域网段为222.31.102.0/24
网管地址为:222.31.102.99-101/24 #访问所有服务
开发部门访问地址为:222.31.102.150/24 #访问特定服务
Acl设置测试:
禁止222.31.102.99/24 访问192.168.10.200/24,其他全部放行
登录设备:
1、定义acl规则:
[SW1]acl 3001 [SW1-acl-adv-3001]rule 0 deny tcp source 222.31.102.99 0 destination-port eq 3389 [SW1-acl-adv-3001]rule 5 permit ip destination any [SW1-acl-adv-3001]q |
2、创建classifier
[SW1]traffic classifier test [SW1-classifier-test]if-match acl 3001 [SW1-classifier-test]q |
3、创建behavior
[SW1]traffic behavior test1 [SW1-behavior-test1]permit [SW1-behavior-test1]q |
4、创建策略
[SW1]traffic policy test2 [SW1-trafficpolicy-test2]classifier test behavior test1 [SW1-trafficpolicy-test2]q |
5、应用到端口
[SW1]interface g0/0/24 [SW1-GigabitEthernet0/0/24]traffic-policy test2 inbound [SW1-GigabitEthernet0/0/24]q
|
6、保存配置(防止意外断电配置丢失)
[SW1]save
|
验证
1、远程桌面连接失败
Ping主机地址能ping通
验证成功