NAT-control
·    默认关闭
·    启用后一定要 NAT
 
相同安全级别
ciscoasa(config)# same-security-traffic permit inter-interface // 相同安全级别可以相互通信,即使有 nat-control
ciscoasa(config)# same-security-traffic permit intra-interface // 远程用户拨到同一个接口 他们之间默认不能通信
 
NAT
nat 0
ciscoasa(config)# nat (inside) 0 1.1.1.0 255.255.255.0
 
nat/pat  nat 超时 3hour pat 超时 30s ------show run 查看  pat 不支持某些协议 esp gre
ciscoasa(config)# nat (inside) 1 1.1.1.0 255.255.255.0  //nat 启用后会影响通信 有些网段没有对应的 global
ciscoasa(config)# global (dmz) 1 2.2.2.100-2.2.2.200
ciscoasa(config)# global (dmz) 1 interface          // 使用完 NAT 再用 PAT
 
Static        外部 -> 内部    使用 static+acl
ciscoasa(config)# static ( inside , dmz ) 2.2.2.100 1.1.1.2 100 1000     // 注意 接口名和 IP 的对应
后面的参数实现可 DoS 防御 100 为并发连接数 1000 为半开连接数
 
·    后面 dns 参数用于: dns 里面地址的转换
 
 
xlate 表创建顺序:
1) NAT 豁免           nat 0 access-list
2) 策略静态 NAT    static access-list
3) 静态 NAT          static 不含端口)
4) 静态 PAT          static 含端口)
5) 策略 NAT          nat xx access-list
6) 动态 NAT PAT  nat xx
 
·    自动编译访问列表(加快访问) ciscoasa(config)# access-list mode auto-commit
·    匹配流量时用掩码
·    默认 extended 格式
 
 
ciscoasa(config)# access-list mylist [line 1] permit ip any any [inactive]
关键字 line 方便插入 acl 条目
关键字 inactive :临时失效某条条目,不用删除,方便。
 
ciscoasa(config)# access-list mylist rename mylist1    // 修改 ACL 的名字
 
time-range IOS ACL
ciscoasa(config)# access-list mylist remark this is my list   // 描述下这个 ACL
 
规避流量 : 黑名单
ciscoasa# shun src_ip [dst_ip sport dport [ptotocol]] [vlan_id]
ciscoasa#shun 172.16.1.1
 
 
icmp 命令
ciscoasa (config) # icmp permit any echo-reply outside
·    网络对象组: IP 地址
·    协议对象组: IP 协议
·    ICMP 对象组: ICMP 类型
·    基本服务对象组: UDP TCP 端口
·    增强型服务对象组:包括协议、 ICMP 类型、 UDP 端口、 TCP 端口
 
可嵌套
ciscoasa(config)# object-group
ciscoasa(config -protocol )# group-object ...   // 嵌套 其他对象
 
排列组合