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

Linux服务器
搭建安全的LinuxSquid代理服务器
linux下apache+php+mysql升级安装过程
Linux服务器中OpenSSH的源码编译与升级
Linux系统下SambaServer的配置文件解析
Linux下如何同时启动多个Tomcat服务器
LinuxIPv6环境下DNS服务器配置攻略
Linux系统下SoftEther服务器的使用方法
实现Linux与宿主机之间的通信
在UbuntuLinux下配置静态DNS
服务器维护:RHEL5系统下故障处理方法
FedoraLinux系统Samba服务器架设
RHEL5Squid透明代理服务器配置过程解析
SlackwareEyooLinux服务器配置相关指令
DebianLinux系统Socks5服务器安装方法
RedHatAS5整合Apache和Tomcat服务器应用
巧用cfengine管理linux服务器
Linux服务器装机安全快速进阶指南
新手学堂:Linux操作系统配置Vsftp方法
利用UNIX系统的TFTP和RCP配置路由器
解决Linux服务器下误删除文件的问题

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


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