Cisco Cisco ASA 5555-X Adaptive Security Appliance 快速安装指南

下载
页码 418
 
3-10
思科 ASA 系列防火墙 CLI 配置指南
 
 3       访问规则
  允许或拒绝网络访问的配置示例
不需要针对 ACL 检查属于已建立连接的已允许数据包;仅初始数据包将得以记录并纳入命中计
数中。对于无连接的协议(如 ICMP),所有数据包均得以记录,即使它们是被允许的数据包,
且所有已拒绝数据包均得以记录。
有关这些消息的详细信息,请参阅
系统日志消息指南。
提示
为消息 106100 启用日志记录时,如果数据包与 ACE 匹配,则 ASA 将创建流条目以跟踪特定间隔
内收到的数据包的数量。对于 ACE,ASA 拥有最大为 32 K 的日志记录流。在任何时间点,都可
能有大量的流同时存在。为防止无限制地消耗内存和 CPU 资源,ASA 将限制并发拒绝流的数
量,仅对拒绝流施加该限制(不施加于允许流),因为它们可能是潜在攻击。达到限制时,ASA 
将不为日志记录创建新的拒绝流,直至现有流到期,并且发布消息 106101。可使用 access-list 
alert-interval
 secs 命令控制该消息的频率,并可以使用 access-list deny-flow-max number 命令控
制缓存的拒绝流的最大数量。
允许或拒绝网络访问的配置示例
本小节包含允许或拒绝网络访问的典型配置示例。
以下示例为内部服务器 1 添加网络对象,为服务器执行静态 NAT 以及为内部服务器 1 启用来自外
部的访问。
hostname(config)# object network inside-server1
hostname(config)# host 10.1.1.1
hostname(config)# nat (inside,outside) static 209.165.201.12
hostname(config)# access-list outside_access extended permit tcp any object inside-server1 
eq www
hostname(config)# access-group outside_access in interface outside
以下示例允许所有主机在 inside 和 hr 网络之间进行通信,但仅允许特定主机访问外部网络:
hostname(config)# access-list ANY extended permit ip any any
hostname(config)# access-list OUT extended permit ip host 209.168.200.3 any
hostname(config)# access-list OUT extended permit ip host 209.168.200.4 any
hostname(config)# access-group ANY in interface inside
hostname(config)# access-group ANY in interface hr
hostname(config)# access-group OUT out interface outside
例如,以下示例 ACL 允许源自内部接口的常见以太网类型流量:
hostname(config)# access-list ETHER ethertype permit ipx
hostname(config)# access-list ETHER ethertype permit mpls-unicast
hostname(config)# access-group ETHER in interface inside
以下示例允许通过 ASA 的一些以太网类型流量,但其将拒绝所有其他流量:
hostname(config)# access-list ETHER ethertype permit 0x1234
hostname(config)# access-list ETHER ethertype permit mpls-unicast
hostname(config)# access-group ETHER in interface inside
hostname(config)# access-group ETHER in interface outside
以下示例将拒绝以太网类型 0x1256 的流量,但允许两个接口上的所有其他流量:
hostname(config)# access-list nonIP ethertype deny 1256
hostname(config)# access-list nonIP ethertype permit any
hostname(config)# access-group ETHER in interface inside
hostname(config)# access-group ETHER in interface outside