|
扩展访问控制列表配置命令
配置
TCP/UDP
协议的扩展访问列表:
rule {normal|special}{permit|deny}{tcp|udp}source {<ip wild>|any}destination <ip wild>|any}
[operate]
配置
ICMP
协议的扩展访问列表:
rule {normal|special}{permit|deny}icmp source {<ip wild>|any]destination {<ip wild>|any]
[icmp-code] [logging]
扩展访问控制列表操作符的含义
equal portnumber
等于
greater-than portnumber
大于
less-than portnumber
小于
not-equal portnumber
不等
range portnumber1 portnumber2
区间
扩展访问控制列表举例
[Quidway]acl 101
[Quidway-acl-101]rule deny souce any destination any
[Quidway-acl-101]rule permit icmp source any destination any icmp-type echo
[Quidway-acl-101]rule permit icmp source any destination any icmp-type echo-reply
[Quidway]acl 102
[Quidway-acl-102]rule permit ip source 10.0.0 .1 0.0.0.0 destination 202.0.0.1 0.0.0.0
[Quidway-acl-102]rule deny ip source any destination any
[Quidway]acl 103
[Quidway-acl-103]rule permit tcp source any destination 10.0.0 .1 0.0.0.0 destination-port equal ftp
[Quidway-acl-103]rule permit tcp source any destination 10.0.0 .2 0.0.0.0 destination-port equal www
[Quidway]firewall enable
[Quidway]firewall default permit|deny
[Quidway]int e0
[Quidway-Ethernet0]firewall packet-filter 101 inbound|outbound
地址转换配置举例
[Quidway]firewall enable
[Quidway]firewall default permit
[Quidway]acl 101
[Quidway-acl-101]rule deny ip source any destination any
[Quidway-acl-101]rule permit ip source 129.38.1.4 0 destination any
[Quidway-acl-101]rule permit ip source 129.38.1.1 0 destination any
[Quidway-acl-101]rule permit ip source 129.38.1.2 0 destination any
[Quidway-acl-101]rule permit ip source 129.38.1.3 0 destination any
[Quidway]acl 102
[Quidway-acl-102]rule permit tcp source 202.39.2.3 0 destination 202.38.160.1 0
[Quidway-acl-102]rule permit tcp source any destination 202.38.160.1 0 destination-port great-than
1024
[Quidway-Ethernet0]firewall packet-filter 101 inbound
[Quidway-Serial0]firewall packet-filter 102 inbound
[Quidway]nat address-group 202.38.160.101 202.38.160.103 pool1
[Quidway]acl 1
[Quidway-acl-1]rule permit source 10.110.10.0 0.0.0 .255
[Quidway-acl-1]rule deny source any
[Quidway-acl-1]int serial 0
[Quidway-Serial0]nat outbound 1 address-group pool1
[Quidway-Serial0]nat server global 202.38.160.101 inside 10.110.10.1 ftp tcp
[Quidway-Serial0]nat server global 202.38.160.102 inside 10.110.10.2 www tcp
[Quidway-Serial0]nat server global 202.38.160.102 8080 inside 10.110.10.3 www tcp
[Quidway-Serial0]nat server global 202.38.160.103 inside 10.110.10.4 smtp udp
PPP
验证:
主验方:
pap|chap
[Quidway]local-user u2 password {simple|cipher} aaa
[Quidway]interface serial 0
[Quidway-serial0]ppp authentication-mode {pap|chap}
[Quidway-serial0]ppp chap user u1 //pap
时,不用此句
pap
被验方:
[Quidway]interface serial 0
[Quidway-serial0]ppp pap local-user u2 password {simple|cipher} aaa
chap
被验方:
[Quidway]interface serial 0
[Quidway-serial0]ppp chap user u1
[Quidway-serial0]local-user u2 password {simple|cipher} aaa
本文出自 “ 蓝兔子学网络,网络工程师 ” 博客,请务必保留此出处 http://xiaoyu51800.blog.51cto.com/112532/16752
|