ASA---------cisco防火墙
ASA目前最流行的是5500系统
型号 | 特点 |
5505 | 端口全为交换端口,适用于小型企业 |
5510、5520 | 适用于中小型企业 |
5530、5540 | 适用于中大型企业 |
5580 | 适用于超大型企业 |
ASA的配置
一、基本配置
1、 配置主机名
Hostname ASA
2、 配置域名(目的为了生成RSA密钥)
Domain-name ASA.com
3、 配置接口
a) 配置5505接口IP---------将接口加入VLAN,再给VLAN配置IP
Interface vlan 3
Nameif inside
Ip add 192.168.1.254 255.255.255.0
No sh
Interface e0/1
Sw ac vlan 3
Exit
b) 配置路由接口IP
Interface e0/2
Nameif outside
Security-level 0
Ip add 200.1.1.2 255.255.255.0
4、 配置使能密码
Enable password 123
5、 配置远程密码
Passwd 456
二、配置远程登录
1、telnet远程登录
telnet 192.168.1.10 255.255.255.255 inside
只允许192.168.1.10这一台主机用TELNET远程登录
2、配置SSH远程登录
(1)配置主机名和域名
(2)生成RSA密钥
Crypto key generate rsa modulus 1024 [1024是密钥的长度]
(3)配置允许SSH登录的用户
Ssh 192.168.1.0 255.255.255.0 outside
( 4 )配置超时时间与版本
Ssh timeout 30
Ssh version 2
3、配置ASDM远程登录
(1)启动http功能
http server enable 443
(2)配置允许ASDM的用户
Asdm 192.168.2.0 255.255.255.0 outside
(3)配置用户名和密码
Username wjc password 123 privilege 15
(4)配置ASDM镜像的位置
Asdm p_w_picpath disk0:/asdmfilename
三、配置静态路由
Route 送出接口名称 目的网段 掩码 下一跳地址
例:route outside 200.0.0.0 255.255.255.0 192.168.2.1
四、配置NAT
1、如果端口优先级高的主机想访问端口优先级低的主机需要配置动态NAT
Nat (inside) 1 192.168.1.0 255.255.255.0
Global (outside) 1 200.1.1.1-200.1.1.10
2、如果内网主机想要访问DMZ区的服务器或者DMZ区的服务器要提供外网主机的访问可以使用静态NAT
Nat (dmz,outside) 200.1.1.2 192.168.2.1
五、配置ACL
1、access-list 101 permit ip any any ============生成ACL
2、access-group 2 in interface outside=========将ACL应用到端口
防火墙默认是拒绝所有的PING包,为了测试网络连通性的方便可以配置ICMP穿越
Access-list 110 permit icmp any any echo-reply
Access-list 110 permit icmp any any unreachable
Access-list 110 permit icmp any any time-out
Access-group 110 in interface outside
ASA高级应用
一、URL过滤
a) 配置class-map映射
b) 配置policy-map映射
c) 将policy-map应用到接口
例:
一个公司内部网络用的IP为192.168.0.0/24,公司内部服务器区用的IP是192.168.1.0/24,外网地址为200.2.2.0/24;现要求公司内部员工只允许访问外网以“.sina.com”的网站,在防火墙上配置URL过滤如下:
Access-list 100 permit tcp 192.168.0.0 255.255.255.0 any eq www
Class-map tcp_class
Match access-list 100
Exit
Regex url “.sina.com”
Class-map type regex match-any url_class
Match regex url
Class-map type inspect http http_class
Match no request header host class url_class
二、日志管理
a) 启用日志
Logging enable
b) 将日志放入缓存中
Logging buffered informational
c) 将日志放入ASDM客户端
Logging enable
Logging asdm informational
d) 将日志放入日志服务器上
Logging trap informational
Logging host inside 192.168.0.1
三、IDS功能
IDS攻击形式分为两种:
信息(info)
攻击(attack)
IDS对威胁的处理方式有三种:
Alarm
Drop
启用IDS:
Ip audit name inside_info info action alarm
Ip audit name inside_attack attack action drop
Ip audit name outside_info info action alarm
Ip audit name outside_attack attack action drop
Ip audit inside_info in interface inside
Ip audit inside_attack in interface inside
Ip audit outside_info in interface inside
Ip audit outside_attack in interface inside
四、启动基本侵略检测
Threat-detection basic-threat
五、防止分片攻击
Fragment chain 1