当前位置: 首页 > 图文教程 > 服务器 > Linux服务器 > Cisco网络设备搭建VPN服务器的全过程

Linux服务器
Linux上双网卡绑定方法(Suse9SP3)
Linux操作系统调优参数的意义
Linux下使用SSH客户端及其Sftp文件传送
教你恢复被误删除的Linux文件
SQL Server注入大全及防御
Linux无法解析域名的解决办法
Linux系统下安装和配置MyEclipse的方法
Ubuntu下VirtualBox 1.4.0设置文件共享
Windows与Linux系统共享StarDict字典文件
修改Linux下相关的登陆信息
Windows通过SecureCRT远程登录Linux主机
Linux操作系统如何修改SWAP交换区的大小
Linux操作系统下为Apache目录添加密码
Linux时间设置与同步(NTP)
Linux内核补丁AMD旁路转换缓冲(TLB)错误
Linux架设DHCP服务器的方法
Fedora 8下Apache配置与管理
Linux操作系统下用单网卡捆绑双IP的方法
Ubuntu Linux系统环境变量配置文件
SUSE Linux中将Tomcat作为Service运行

Linux服务器 中的 Cisco网络设备搭建VPN服务器的全过程


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-18   浏览: 97 ::
收藏到网摘: n/a

环境:在公司的南京办事处与上海办事处之间建立VPN联接。
南京办事处网络设置:
内网IP10.1.1.0/24
外网IP202.102.1.5/24
上海办事处网络设置:
内网IP10.1.2.0/24
外网IP202.102.1.6/24

南京路由器配置
!
servicetimestampsdebuguptime
servicetimestampsloguptime
noservicepassword-encryption
!
hostnamenanjing
!
enablecisco
!
!
!------以下配置加密--------
==============================

cryptoisakmppolicy1生成iskamppolicynumber1
encryptiondes选择用DESencryption也可用3DES指定三倍DES加密
hashsha指定使用的散列算法,也可以是md5(二端保持一致)
authenticationpre-share
group1指定为Diffie-Hellman组,1表示768位,2表示1024位
lifetime14400指定安全关联的有效期,不设就为默认值
------以下配置密钥方法-----
cryptoisakmpidentityaddress指定与远程路由器通信时使用isakmp标识
cryptoisakmpkey654321address202.102.1.6对远程路由器端口202.102.1.6使用密钥654321
cryptoisakmpkey654321address192.168.1.2对远程路由器隧道端口192.168.1.2使用密钥654321
!
------以下定义一个转换集-----
cryptoipsectransform-settset1ah-md5-hmacesp-desesp-md5-hmac可以定义一个或多个集
!
!
-------以下建立加密图------
cryptomapcmap1local-addressserial0定义加密图cmap1并指定s0为本地地址
cryptomapcmap11ipsec-isakmp用序号1设置加密图
setpeer202.102.1.6设定目标地址
setpeer192.168.1.2
settransform-settest1指定转换集
matchaddress111指定加密访问列表111中的地址
!
!
process-max-time200
!
-------以下设置隧道端口------
interfaceTunnel0
ipaddress192.168.1.1255.255.255.0
tunnelsource202.102.1.5
tunneldestination202.102.1.6
cryptomapcmap
!
-------以下设置内网口------
interfaceEthernet0
ipaddress10.1.1.1255.255.255.0
!
-------以下设置外网口------
interfaceserial0
ipaddress202.102.1.5255.255.255.0
noipmroute-cache
nofair-queue
cryptomapcmap
!
ipclassless
!
-------以下建立访问列表111------
access-list111permitiphost202.102.1.5host202.102.1.6
access-list111permitiphost202.102.1.6host202.102.1.5
access-list111permitip10.1.1.00.0.0.255202.102.1.00.0.0.255
access-list111permitip10.1.2.00.0.0.255202.102.1.00.0.0.255
access-list111permitip10.1.1.00.0.0.25510.1.2.00.0.0.255
access-list111permitip10.1.2.00.0.0.25510.1.1.00.0.0.255
!
linecon0
lineaux0
linevty04
passwordcisco
login
!
end
!

上海路由器配置
!
servicetimestampsdebuguptime
servicetimestampsloguptime
noservicepassword-encryption
!
hostnameshanghai
!
enablecisco
!
!
!------以下配置加密--------
cryptoisakmppolicy1生成iskamppolicynumber1
encryptiondes选择用DESencryption也可用3DES指定三倍DES加密
hashsha指定使用的散列算法,也可以是md5(二端保持一致)
authenticationpre-share
group1指定为Diffie-Hellman组,1表示768位,2表示1024位
lifetime14400指定安全关联的有效期,不设就为默认值
------以下配置密钥方法-----
cryptoisakmpidentityaddress指定与远程路由器通信时使用isakmp标识
cryptoisakmpkey654321address202.102.1.5对远程路由器端口202.102.1.6使用密钥654321
cryptoisakmpkey654321address202.102.1.6对远程路由器端口202.102.1.6使用密钥654321
cryptoisakmpkey654321address192.168.1.1对远程路由器隧道端口192.168.1.2使用密钥654321
!
------以下定义一个转换集-----
cryptoipsectransform-settset1ah-md5-hmacesp-desesp-md5-hmac可以定义一个或多个集
!
!
-------以下建立加密图------
cryptomapcmap1local-addressserial0定义加密图cmap1并指定s0为本地地址
cryptomapcmap11ipsec-isakmp用序号1设置加密图
setpeer202.102.1.5设定目标地址
setpeer202.102.1.6
setpeer192.168.1.1
settransform-settest1指定转换集
matchaddress111指定加密访问列表111中的地址
!
!
process-max-time200
!
-------以下设置隧道端口------
interfaceTunnel0
ipaddress192.168.1.2255.255.255.0
tunnelsource202.102.1.6
tunneldestination202.102.1.5
cryptomapcmap
!
-------以下设置内网口------
interfaceEthernet0
ipaddress10.1.2.1255.255.255.0
!
-------以下设置外网口------
interfaceserial0
ipaddress202.102.1.6255.255.255.0
noipmroute-cache
nofair-queue
cryptomapcmap
!
ipclassless
!
-------以下建立访问列表111------
access-list111permitiphost202.102.1.5host202.102.1.6
access-list111permitiphost202.102.1.6host202.102.1.5
access-list111permitip10.1.1.00.0.0.255202.102.1.00.0.0.255
access-list111permitip10.1.2.00.0.0.255202.102.1.00.0.0.255
access-list111permitip10.1.1.00.0.0.25510.1.2.00.0.0.255
access-list111permitip10.1.2.00.0.0.25510.1.1.00.0.0.255
!
linecon0
lineaux0
linevty04

passwordcisco
login
!
end
!