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

Linux服务器
linux下用cron定时执行任务的方法
.htaccess绑定域名到子目录的方法
linux apache下虚拟主机配置方法
apache 局域网访问配置方案
linux Apache服务器系统安全设置与优化
linux中mac地址绑定方法
linux托盘不断闪烁之解决方法
Apache配置 虚拟转向实例
Apache No space left on device的解决办法
Apache rewrite的重写相关的参数说明
LINUX入门级常用命令20条整理
Ubuntu设置开机自动挂载所有格式硬盘分区
5个可能被你忽略的Linux安全设置方法
学习Apache的mod rewrite、access写法
改版时保留原链接,创建新的URL的方法
rsync中文手册之使用rsync实现网站镜像和备份linux
rsync 数据同步使用详解
linux URL的301重定向代码分析
eclipse3.2.2 + MyEclipse5.5 + Tomcat5.5.27 配置数据库连接池
Apache服务器二级域名的完美实现

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-18   浏览: 110 ::
收藏到网摘: 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
!