ASA 5505配置手册

发布时间 : 星期一 文章ASA 5505配置手册更新完毕开始阅读

ASA 5505 配置手册

1. 初始配置

ciscoasa> enable 从进入用户模式进入特权模式

ciscoasa# configure terminal 从特权模式进入全局配置模式 ciscoasa(config)# hostname AYKJ-FW 更改防火墙名称 AYKJ-FW(config)# passwd aykj 配置远程登录密码 AYKJ-FW(config)# enable password aykj 配置enable密码

2. 端口配置

AYKJ-FW(config)# interface Vlan2 创建SVI口,ASA5505必须通过SVI口配置地址 AYKJ-FW(config)# nameif outside 定义为outside口,即连接外网接口

AYKJ-FW(config)# security-level 0 定义安全级别 ,范围0~100,其中inside、outside口安全级别为系统自动定义和生成

AYKJ-FW(config)# ip address 221.226.186.58 255.255.255.252 配置运营商分配公网地址 AYKJ-FW(config)# interface Vlan3

AYKJ-FW(config)# nameif inside 定义为inside口,即连接内网接口 AYKJ-FW(config)# security-level 100 inside口默认安全级别100

AYKJ-FW(config)# ip address 10.0.0.1 255.255.255.0 配置内网口地址

3. 管理配置

AYKJ-FW(config)# telnet 0.0.0.0 0.0.0.0 inside 允许内网所有地址通过telnet登录防火墙 AYKJ-FW(config)# ssh 0.0.0.0 0.0.0.0 outside 允许外网所有地址通过ssh登录防火墙 AYKJ-FW(config)# ssh version 1 使用ssh版本1

AYKJ-FW(config)# http server enable 开启web页面,即开启asdm,与传统的如ASA5520等有专门管理口的防火墙不同,ASA5505只要启用服务,并应用到端口,那么只要网络通畅就可以通过asdm管理,更加灵活 AYKJ-FW(config)# http 0.0.0.0 0.0.0.0 inside

AYKJ-FW(config)# http 0.0.0.0 0.0.0.0 outside 这两条命令意味着所有只要能够访问防火墙的地址均可以通过asdm管理防火墙

4. 路由配置

AYKJ-FW(config)# route outside 0.0.0.0 0.0.0.0 221.226.186.57 配置上网默认路由,下一条为运营商分配的网关

AYKJ-FW(config)# route inside [内网网段] [掩码] [防火墙内网口] 配置内网路由,由于本次内网与防火墙在一个地址段,所以不需要

5. NAT配置

5.1 动态NAT配置

AYKJ-FW(config)# global (outside) 1 interface 将outside接口设置为NAT的外网接口 AYKJ-FW(config)# nat (inside) 1 10.0.0.0 255.255.255.0 允许内网网段通过NAT访问互联网

5.2 静态NAT映射

AYKJ-FW(config)# access-list perout extended permit tcp any host 221.226.186.58 eq www 首先在防火墙外网口开放需要做映射的端口

AYKJ-FW(config)# access-group perout in interface outside 在外网口启用该ACL

AYKJ-FW(config)# static (inside,outside) tcp interface www 10.0.0.150 www netmask 255.255.255.255 将内网服务器的端口映射到外网 AYKJ-FW(config)# global (inside) 1 interface

AYKJ-FW(config)# static (inside,inside) tcp 221.226.186.58 www 10.0.0.150 www netmask 255.255.255.255 以上两条命令的作用是当内网用户通过外网地址去访问内网服务器时,直接映射到内网,如果不做则内网用户不能通过外网地址访问内网服务器

6. VPN配置

6.1 VPN基础配置

AYKJ-FW(config)# ip local pool vpn 10.0.1.210-10.0.1.220 mask 255.255.255.0 创建vpn地址池,地址池应与本地网段不在同一个段

AYKJ-FW(config)# access-list inside_nat0_outbound extended permit ip 10.0.0.0 255.255.255.0 10.0.1.0 255.255.255.0 定义vpn流量与内网流量的互访

AYKJ-FW(config)# nat (inside) 0 access-list inside_nat0_outbound 该流量不参与nat翻译 AYKJ-FW(config)# access-list split standard permit 10.0.0.0 255.255.255.0 定义vpn用户允许访问网段

AYKJ-FW(config)# username asa password cisco 创建vpn用户,不做策略则该用户可以通过SSL和IPSEC拨入VPN

6.2 SSL(WEB) VPN配置

AYKJ-FW(config)# webvpn 配置webvpn

AYKJ-FW(config-webvpn)# enable outside 在外网口启用webvpn

AYKJ-FW(config-webvpn)# svc image disk0:/anyconnect-win-2.4.1012-k9.pkg 调用vpn客户端软件

AYKJ-FW(config-webvpn)# svc enable 启用客户端软件

AYKJ-FW(config)# group-policy ssl internal 创建webvpn组策略 AYKJ-FW(config)# group-policy ssl attributes 配置组策略属性

AYKJ-FW(config-group-policy)# vpn-tunnel-protocol svc webvpn 启用webvpn隧道

AYKJ-FW(config-group-policy)# split-tunnel-policy tunnelspecified 只允许split匹配流量通过vpn隧道

AYKJ-FW(config-group-policy)# split-tunnel-network-list value split 水平分割策略使用split,由于vpn用户没有网关,需要通过该策略使vpn用户访问内网

AYKJ-FW(config)# tunnel-group ssl type remote-access 创建vpn隧道,类型为远程接入 AYKJ-FW(config)# tunnel-group ssl general-attributes 配置vpn隧道基础属性 AYKJ-FW(config-tunnel-general)# address-pool vpn 调用vpn地址池

6.3 IPSEC VPN 配置

AYKJ-FW(config)# crypto isakmp enable outside 在outside口启用ipsec vpn AYKJ-FW(config)# crypto isakmp disconnect-notify 连接中断时报错

AYKJ-FW(config)# crypto isakmp policy 10 配置策略优先级

AYKJ-FW(config-isakmp-policy)# authentication pre-share 通过预共享密钥拨入vpn AYKJ-FW(config-isakmp-policy)# encryption 3des通过3des格式加密数据 AYKJ-FW(config-isakmp-policy)# hash md5 通过md5算法校验数据 AYKJ-FW(config-isakmp-policy)# group 2 设置迪夫-赫尔曼算法组 AYKJ-FW(config-isakmp-policy)# lifetime 86400 设置连接时长 AYKJ-FW(config)# group-policy aykj internal创建ipsec vpn策略组

AYKJ-FW(config)# group-policy aykj attributes 配置策略组属性

AYKJ-FW(config-group-policy)# vpn-tunnel-protocol IPSec 启用ipsec vpn隧道 AYKJ-FW(config-group-policy)# split-tunnel-policy tunnelspecified 只允许split匹配流量通过vpn隧道

AYKJ-FW(config-group-policy)# split-tunnel-network-list value split 水平分割策略使用split,由于vpn用户没有网关,需要通过该策略使vpn用户访问内网

AYKJ-FW(config)# tunnel-group aykj type remote-access 创建vpn隧道,类型为远程接入 AYKJ-FW(config)# tunnel-group aykj general-attributes 配置隧道基础属性 AYKJ-FW(config-tunnel-general)# address-pool vpn调用地址池

AYKJ-FW(config-tunnel-general)# default-group-policy aykj 调用组策略 AYKJ-FW(config)# tunnel-group aykj ipsec-attributes 配置隧道ipsec属性 AYKJ-FW(config-tunnel-ipsec)# pre-shared-key aykj 预共享密钥为aykj

联系合同范文客服:xxxxx#qq.com(#替换为@)