华为交换机配置acl单向访问
//配置acl的tcp-flag ack syn使192.168.22.0/24网段 可以相应192.168.21.0/24的请求
//配置拒绝tcp-flag syn使192.168.22.0/24网段无法主动向192.168.21.0/24发起请求
//配置拒绝icmp-type echo防止192.168.22.0/24网段ping探测192.168.21.0/24的网段
#
acl number 3010
rule 5 permit tcp source 192.168.22.0 0.0.0.255 destination 192.168.21.0 0.0.0.255 tcp-flag ack syn
rule 10 deny tcp source 192.168.22.0 0.0.0.255 destination 192.168.21.0 0.0.0.255 tcp-flag syn
rule 15 deny icmp source 192.168.22.0 0.0.0.255 destination 192.168.21.0 0.0.0.255 icmp-type echo
#
traffic classifier c1 operator or
if-match acl 3010
#
traffic behavior b1
permit
#
traffic policy p1 match-order config
classifier c1 behavior b1
//将策略p1应用于接口
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 22
traffic-policy p1 inbound