12.1.1 思科ASA8.4:两台ASA防火墙配置IPSec连接
12.1.1 思科ASA8.4:两台ASA防火墙配置IPSec连接
需求:ASA1与ASA2之间建立IPSec VPN把内网192.168.1.0/24与192.168.2.0/0实现互通。
拓扑图
(1)配置管理接口的ip地址、安全区域与配置ASDM访问
interface Ethernet0
nameif manager
security-level 90
ip address 10.12.3.3 255.255.0.0
no shutdown
(2)访问规则:允许所有
命令行配置:permit any any
ciscoasa(config)# access-list global_access_1 extended permit ip any any
ciscoasa(config)# access-group global_access_1 global
access-list global_access_1 extended permit ip any any
access-group global_access_1 global
(3)配置ASDM来管理ASA防火墙 (图形化界面管理防火墙)
ciscoasa(config)# username admin password admin privilege 15 //创建15级帐户
ciscoasa(config)# http server enable
ciscoasa(config)# http 0.0.0.0 0.0.0.0 manager //开启http的访问的范围
username admin password admin privilege 15
http server enable
http 0.0.0.0 0.0.0.0 manager
(4)配置业务接口
!ASA1
interface Ethernet1
nameif outside
security-level 20
ip address 11.11.11.1 255.255.255.0
no shutdown
!
interface Ethernet2
nameif inside
security-level 80
ip address 192.168.1.254 255.255.255.0
no shutdown
!ASA2
interface Ethernet1
nameif outside
security-level 20
ip address 12.12.12.1 255.255.255.0
no shutdown
!
interface Ethernet2
nameif inside
security-level 80
ip address 192.168.2.254 255.255.255.0
no shutdown
ISP的全部配置:
!
interface GigabitEthernet0/0
ip address 11.11.11.254 255.255.255.0
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/1
ip address 12.12.12.254 255.255.255.0
duplex auto
speed auto
media-type rj45
(5)配置源nat,让内网访问互联网
ASA1:
!配置默认路由
route manager 0.0.0.0 0.0.0.0 10.12.12.254 1
object network network192.168.2.x
subnet 192.168.2.0 255.255.255.0
object network network192.168.1.x
subnet 192.168.1.0 255.255.255.0
exit
!配置动态NAT, 让内网用户访问外网
nat (inside,manager) source dynamic network192.168.1.x interface
ASA2:
!配置默认路由
route manager 0.0.0.0 0.0.0.0 10.12.12.254 1
route manager 172.16.1.0 255.255.255.0 10.12.12.254 1 !此条静态路由与本实验无关
object network network192.168.1.x
subnet 192.168.1.0 255.255.255.0
object network network192.168.2.x
subnet 192.168.2.0 255.255.255.0
exit
!配置动态NAT, 让内网用户访问外网
nat (inside,manager) source dynamic network192.168.2.x interface
测试:
(6)配置IPSec VPN
配置静态路由,让两台防火墙可以正常互通。
asa1(config)# route outside 12.12.12.0 255.255.255.0 11.11.11.254
asa2(config)# route outside 11.11.11.0 255.255.255.0 12.12.12.254
ASA2的配置:
ASA2:
!配置ISAKMP策略
asa2(config)# crypto ikev1 enable outside
asa2(config)# crypto ikev1 policy 1
asa2(config-ikev1-policy)# encryption aes
asa2(config-ikev1-policy)# hash sha
asa2(config-ikev1-policy)# authentication pre-share
asa2(config-ikev1-policy)# group 2
asa2(config)# tunnel-group 11.11.11.1 type ipsec-l2l
asa2(config)# tunnel-group 11.11.11.1 ipsec-attributes
asa2(config-tunnel-ipsec)# ikev1 pre-shared-key cjh
!配置ACL,即定义感兴趣流
access-list 101 extended permit ip 192.168.2.0 255.255.255.0 192.168.1.0 255.255.255.0
!配置IPSec策略(转换集)
asa2(config)# crypto ipsec ikev1 transform-set cjh1-set esp-aes esp-sha-hmac
!配置加密映射集
asa2(config)# crypto map cjh2-map 1 match address 101
asa2(config)# crypto map cjh2-map 1 set peer 11.11.11.1
asa2(config)# crypto map cjh2-map 1 set ikev1 transform-set cjh1-set
!将映射集应用在接口
asa2(config)# crypto map cjh2-map interface outside
ASA1:
crypto ikev1 enable outside
crypto ikev1 policy 1
encryption aes
hash sha
authentication pre-share
group 2
exit
tunnel-group 12.12.12.1 type ipsec-l2l
tunnel-group 12.12.12.1 ipsec-attributes
ikev1 pre-shared-key cjh
exit
access-list 101 extended permit ip 192.168.1.0 255.255.255.0 192.168.2.0 255.255.255.0
crypto ipsec ikev1 transform-set cjh1-set esp-aes esp-sha-hmac
crypto map cjh2-map 1 match address 101
crypto map cjh2-map 1 set peer 12.12.12.1
crypto map cjh2-map 1 set ikev1 transform-set cjh1-set
crypto map cjh2-map interface outside
(7)把流量引向VPN方向
查看:
asa2# show crypto isakmp sa
There are no IKEv1 SAs
There are no IKEv2 SAs
asa2# show crypto ipsec sa
There are no ipsec sas
asa2#
ipsec没有建立起隧道,因为流量走向了互联网,而没有走向vpn访问,因为这个实验中,相对是有两个互联网出口的。所以接下来还需要把流量引向VPN方向。
asa1(config)# route outside 192.168.2.0 255.255.255.0 11.11.11.254
asa2(config)# route outside 192.168.1.0 255.255.255.0 12.12.12.254
(8)查看
配置完成需要流量的触发才可以成功协商起来SA,ping对端内网地址即可:
show 命令
show crypto isakmp sa //查看第一阶段建立情况
show crypto ipsec sa //查看第二阶段建立情况
show crypto isakmp stats //查看已激活的隧道数量
查看路由表:
ASDM配置VPN向导示例:
思科Cisco ASA防火墙(列表、list、全)asalist、防火墙list
http://www.zh-cjh.com/wenzhangguilei/2594.html
文章归类、所有文章列表、LISTLIST
http://www.zh-cjh.com/wangzhangonggao/2195.html
2、本资源基本为原创,部分来源其他付费资源平台或互联网收集,如有侵权请联系及时处理。
3、本站大部分文章的截图来源实验测试环境,请不要在生产环境中随意模仿,以免带来灾难性后果。
转载请保留出处: www.zh-cjh.com珠海陈坚浩博客 » 12.1.1 思科ASA8.4:两台ASA防火墙配置IPSec连接
作者: cjh
手机扫一扫,手机上查看此文章: |
一切源于价值!
其他 模板文件不存在: ./template/plugins/comment/pc/index.htm