找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 9953|回复: 1

Cisco ASA5505 Remote VPN Configuration

[复制链接]
发表于 2007-9-7 00:38:58 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
最近调试一台5505,感觉很不顺当,按照官方的快速配置文档一路走下来照样不能正常运转。。

为了记录也为了使大家少走弯路,把配置文件留下来提供参考。

: Saved
: Written by enable_15 at 12:31:18.650 UTC Mon Sep 3 2007
!
ASA Version 7.2(2)
!
hostname ciscoasa
enable password 2KFQnbNIdI.2KYOU encrypted
names
!
interface Vlan1
nameif inside
security-level 100
ip address 192.168.1.1 255.255.255.0
!
interface Vlan2
mac-address 001d.0900.0bd7
nameif outside
security-level 0
ip address 219.*.*.17 255.255.255.224
!
interface Ethernet0/0
switchport access vlan 2
!
interface Ethernet0/1
!
interface Ethernet0/2
!
interface Ethernet0/3
!
interface Ethernet0/4
!
interface Ethernet0/5
!
interface Ethernet0/6
!
interface Ethernet0/7
!
passwd 2KFQnbNIdI.2KYOU encrypted
ftp mode passive
access-list outside_cryptomap_dyn_20 extended permit ip any 192.168.10.0 255.255.255.0
pager lines 24
mtu inside 1500
mtu outside 1500
ip local pool remote 192.168.10.1-192.168.10.254
ip local pool test 10.0.0.1-10.0.0.50
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 1 192.168.0.0 255.255.0.0
route outside 0.0.0.0 0.0.0.0 219.*.*.30 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout uauth 0:05:00 absolute
group-policy test internal
group-policy test attributes
dns-server value 202.*.224.68 202.*.227.68
username test password P4ttSyrm33SV8TYp encrypted
username admin password f3UhLvUj1QsXsuK7 encrypted privilege 15
http server enable
http 0.0.0.0 0.0.0.0 inside
http 0.0.0.0 0.0.0.0 outside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
crypto ipsec transform-set ESP-DES-MD5 esp-des esp-md5-hmac
crypto dynamic-map outside_dyn_map_1 20 match address outside_cryptomap_dyn_20
crypto dynamic-map outside_dyn_map_1 20 set transform-set ESP-DES-MD5
crypto map outside_map_1 65535 ipsec-isakmp dynamic outside_dyn_map_1
crypto map outside_map_1 interface outside
crypto isakmp enable outside
crypto isakmp policy 20
authentication pre-share
encryption des
hash md5
group 2
lifetime 86400
tunnel-group test type ipsec-ra
tunnel-group test general-attributes
address-pool remote
default-group-policy test
tunnel-group test ipsec-attributes
pre-shared-key test
telnet 0.0.0.0 0.0.0.0 inside
telnet timeout 5
ssh timeout 5
console timeout 0

!
class-map inspection_default
match default-inspection-traffic
!
!
policy-map type inspect dns preset_dns_map
parameters
   message-length maximum 512
policy-map global_policy
class inspection_default
   inspect dns preset_dns_map
   inspect ftp
   inspect h323 h225
   inspect h323 ras
   inspect rsh
   inspect rtsp
   inspect esmtp
   inspect sqlnet
   inspect skinny
   inspect sunrpc
   inspect xdmcp
   inspect sip
   inspect netbios
   inspect tftp
!
service-policy global_policy global
prompt hostname context
Cryptochecksum:ad563d89bad5cefb102d24078ec44367
: end

修正部分(最终修改版,同4Sep07-end):
1.添加 NO_NAT ACL ,即access-list inside_outbound_nat0_acl extended permit ip 192.168.1.0 255.255.255.0 192.168.10.0 255.255.255.0(内网用户访问VPNPOOL)

应用到nat (inside) 0 access-list inside_outbound_nat0_acl

解决VPN USER不能访问内网的问题


2. 添加access-list splitTunnelAcl extended permit ip 192.168.1.0 255.255.255.0 192.168.10.0 255.255.255.0 (内网用户访问VPNPOOL)
vpngroup username split-tunnel splitTunnelAcl

解决VPN USER不能访问互联网的问题


增加用户配置:
vpngroup username address-pool remote
vpngroup username dns-server 202.102.227.68 202.102.224.68
vpngroup username split-tunnel splitTunnelAcl
vpngroup username password 1234

注释部分:
VPN 用户认证:
1.local user database 认证   ,添加username XXX password xxx
2.group 认证,即 vpngroup XXX等命令,如下


vpngroup username split-tunnel splitTunnelAcl   =(以下是ASA中转换的命令)
group-policy test attributes
dns-server value 202.102.224.68 202.102.227.68
split-tunnel-policy tunnelspecified
split-tunnel-network-list value splitTunnelAcl

                                                                                    

Split tunneling:The ability to simultaneously direct packets over the Internet in
clear text and encrypted through an IPSec tunnel. The VPN device
supplies a list of networks to the VPN Client for tunneled traffic.
You enable split tunneling and configure the network list on the
VPN device.

可以用控制列表于Split tunneling绑定将内网路由发布到客户机,使内网流量从VPN走,别的流量从原有网络走,可达到同时上互联网的作用。
如:
access-list 101 permit ip 192.168.1.0 255.255.255.0 192.168.10.0 255.255.255.0
vpngroup vpn1 split-tunnel 101




以上配置参见PIX515E

interface ethernet0 auto
interface ethernet1 auto
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password pix515 encrypted
fixup protocol dns maximum-length 512
fixup protocol ftp 21
fixup protocol h323 h225 1720
fixup protocol h323 ras 1718-1719
fixup protocol http 80
fixup protocol rsh 514
fixup protocol rtsp 554
fixup protocol sip 5060
fixup protocol sip udp 5060
fixup protocol skinny 2000
no fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol tftp 69
names
access-list inside_outbound_nat0_acl permit ip host 192.168.0.3 192.168.10.0 255.255.255.0
access-list inside_outbound_nat0_acl permit ip host 192.168.1.2 192.168.10.0 255.255.255.0
access-list inside_outbound_nat0_acl permit ip host 192.168.0.1 192.168.10.0 255.255.255.0
access-list lbdl_splitTunnelAcl permit ip host 192.168.0.3 any
access-list lbdl_splitTunnelAcl permit ip host 192.168.1.2 any
access-list lbdl_splitTunnelAcl permit ip host 192.168.0.1 any
access-list outside_cryptomap_dyn_20 permit ip any 192.168.10.0 255.255.255.0
pager lines 24
mtu outside 1500
mtu inside 1500
ip address outside 218.28.105.94 255.255.255.0
ip address inside 192.168.1.1 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
ip local pool lbdl 192.168.10.1-192.168.10.254
no failover
failover timeout 0:00:00
failover poll 15
no failover ip address outside
no failover ip address inside
pdm location 192.168.0.0 255.255.0.0 inside
pdm location 192.168.1.0 255.255.255.0 inside
pdm location 192.168.10.0 255.255.255.0 outside
pdm location 0.0.0.0 0.0.0.0 outside
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 0 access-list inside_outbound_nat0_acl
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
static (inside,outside) tcp 218.28.105.94 21 192.168.0.2 21 netmask 255.255.255.255 0 0
conduit permit icmp any any
conduit permit ip any any
conduit permit tcp any any
route outside 0.0.0.0 0.0.0.0 218.28.105.93 1
route inside 192.168.0.0 255.255.255.0 192.168.1.2 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00
timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00
timeout uauth 0:05:00 absolute
aaa-server TACACS+ protocol tacacs+
aaa-server radius protocol radius
aaa-server LOCAL protocol local
http server enable
http 0.0.0.0 0.0.0.0 outside
http 192.168.0.0 255.255.0.0 inside
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable
sysopt connection permit-ipsec
crypto ipsec transform-set ESP-DES-MD5 esp-des esp-md5-hmac
crypto dynamic-map outside_dyn_map_1 20 match address outside_cryptomap_dyn_20
crypto dynamic-map outside_dyn_map_1 20 set transform-set ESP-DES-MD5
crypto map outside_map_1 65535 ipsec-isakmp dynamic outside_dyn_map_1
crypto map outside_map_1 interface outside
isakmp enable outside
isakmp policy 20 authentication pre-share
isakmp policy 20 encryption des
isakmp policy 20 hash md5
isakmp policy 20 group 2
isakmp policy 20 lifetime 86400
vpngroup lbdl address-pool lbdl
vpngroup lbdl dns-server 202.102.227.68
vpngroup lbdl split-tunnel lbdl_splitTunnelAcl
vpngroup lbdl idle-time 1800
vpngroup lbdl password 1234
telnet 192.168.0.0 255.255.255.0 inside
telnet 192.168.1.0 255.255.255.0 inside
telnet timeout 5
ssh timeout 5
console timeout 0
vpdn enable outside
terminal width 80



=THE END= Powerd By Ivven.Shang    o(∩_∩)o..
routeros
发表于 2007-9-10 16:06:46 | 显示全部楼层
谢谢分享,少走弯路
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-12-22 18:10 , Processed in 0.043720 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表