当前位置: 东星资源网 > 阅读 > 正文

greipsec配置

时间:2017-05-11 来源:东星资源网 本文已影响 手机版

篇一:GRE和IPSec结合案例

GRE over IPsec & IPsec over GRE

IPSec -Over-GRE是先ipsec后gre, GRE -Over-IPSec 是先gre后ipsec,也就是说ipsec是最后的承载方式。一般常用的就是这种,解决了ipsec不支持多播的问题。

IPsec over GRE 和GRE over IPsec在配置上的区别:

GRE over IPsec IPsec over GRE

ACL定义: GRE数据流内网数据流

IKE Peer中remote-address 对方公网地 对方GRE Tunnel地址 应用端口: 公网出 GRE Tunnel上 over 传输模式):

好处:可以利用GRE封装组播或广播了以及非IP流量,因为如果不使用GRE的话,IPSEC是传不了组播或广播IP流量的

里外)(tunel模式) 在外面,由来封装!!!IPSEC over 的时候,路由协议流量是明文的

注意!!!当指的peer是对等体物理接口地址的时候不是IPSEC over GRE,只有当peer是对等体的tunnel口是才是真正的 over

SecPath防火墙GRE over IPSec+ospf的典型配置

一、 组网需求:

两个Peer分别使用的是SecPath1000F,中间公网使用一台SecPath100F起连接作用,两局域网分别使用的是SecPath1000F的LoopBack0口来模拟。在两个Peer上配置GRE over IPSec,使两个局域网能够穿越公网进行通信,并且保护一切传输的数据。

二、 组网图

SecPath1000F:版本为Version 3.40, ESS 1622;

三、 配置步骤

1.SecPath1000F(左)的主要配置:

sysname fw1

#

router id 10.1.1.1

#

firewall packet-filter enable

firewall packet-filter default permit

#

ike proposal 10//设置IKE的策略

authentication-algorithm md5 //选择md5算法来进行验证(验证方式为预共享密钥,密钥交换为DH:group1,因为此两项均为缺省设置,故没有显示在dis cu 中,特此说明)

sa duration 1500 //设置IKE的生存周期为1500s

#

ike peer wanxin //设置预共享密钥的认证字

pre-shared-key h3c//密钥为:h3c(对端也必须一样)

remote-address 202.103.1.1 //设置对端地址

#

ipsec proposal wanxin //创建一个名为“wanxin”的安全提议

encapsulation-mode transport//报文封装采用传输模式(安全协议采用esp,认证算法采用sha1,此两项均为缺省设置,故也没有显示在dis cu 中) #

ipsec policy 1 10 isakmp//创建安全策略,协商方式为自动协商,也就是采用IKE的策略协商

security acl 3000 //引用下面设置的acl 3000

ike-peer wanxin//引用上面设置的“ike peer wanxin”

proposal wanxin//引用上面设置的“ipsec proposal wanxin” sa duration time-based 1500 //设置基于时间的生存周期为1500s #

acl number 3000 //创建加密数据流(加密的是两Peer出口的网段,这个很关键)

rule 1 permit gre source 192.168.1.0 0.0.0.255 destination 202.103.1.0 0.0.0.255

rule 2 deny ip

#

interface GigabitEthernet0/0

ip address 192.168.1.1 255.255.255.0

ipsec policy 1 //在出接口上应用安全策略(只有应用了IPSec才能生效) #

interface Tunnel0 //创建GRE隧道

ip address 1.1.1.1 255.255.255.0

source 192.168.1.1

destination 202.103.1.1

#

interface LoopBack0 //用一个回环口地址带模拟一个LAN地址

ip address 10.1.1.1 255.255.255.0

#

firewall zone untrust

add interface GigabitEthernet0/0

add interface Tunnel0 //切记隧道接口也需要加入某一个域

set priority 85

#

ospf 1 //使用OSPF来保证两LAN之间能路由

area 0.0.0.0

network 1.1.1.0 0.0.0.255

network 10.1.1.0 0.0.0.255

#

ip route-static 0.0.0.0 0.0.0.0 192.168.1.2 preference 60 //保证两Peer之间能够通信,从而协商IPSec参数,同时也触发加密流量

2.SecPath1000F(Peer2)的主要配置:

注:Peer2的配置与Peer1基本相同,故注释同上

sysname fw2

#

router id 10.2.2.2

#

firewall packet-filter enable

firewall packet-filter default permit

#

ike proposal 10

authentication-algorithm md5

sa duration 1500

#

ike peer wanxin

pre-shared-key h3c

remote-address 192.168.1.1

#

ipsec proposal wanxin

encapsulation-mode transport

#

篇二:gre over ipsec原理和配置

gre over ipsec

这里首先补充一下知识吧:

1. Ipsec中有2种封装模式:一种是隧道模式,一种是传输模式;当我们使用GRE OVER ipsec时,如果使用隧道模式的话,会多封装 20个字节的ESP头部,其与GRE添加的头部ip完全相同,故而,在GRE over ipsec 时,建议使用传输模式。(主要是通讯点和传输点之间的关系)

2. 配置gre over ipsec的时候,可以选择两种的方法,这里都会介绍和给出配置,建议使用第二种方法。

3. 第二种配置GRE over IPsec 的方式:profile

Profile 可以看做是GRE tunnel中的一种保护机制,在使用profile时,无需配置感兴趣流,无需set peer,如下操作即可:

第一种方法:

R1:

!

hostname R1

!

crypto isakmp policy 10

hash md5

authentication pre-share

group 2

crypto isakmp key zhang address 23.1.1.2

!

!

crypto ipsec transform-set mytrans esp-3des esp-md5-hmac

mode transport

!

crypto map mymap 10 ipsec-isakmp

set peer 23.1.1.2

set transform-set mytrans

match address VPN

!

!

!

!

interface Tunnel0

ip address 172.16.1.1 255.255.255.0

tunnel source FastEthernet0/0

tunnel destination 23.1.1.2

tunnel key 123

!

interface Loopback10

ip address 192.168.10.1 255.255.255.0

!

interface FastEthernet0/0

ip address 12.1.1.1 255.255.255.0

duplex auto

speed auto

crypto map mymap

!

router ospf 1

router-id 1.1.1.1

log-adjacency-changes

network 172.16.1.0 0.0.0.255 area 0

network 192.168.10.0 0.0.0.255 area 0

!

ip access-list extended VPN

permit gre 12.1.1.0 0.0.0.255 23.1.1.0 0.0.0.255

!

End

R2配置:

hostname R2

!

interface Loopback0

ip address 2.2.2.2 255.255.255.0

!

interface FastEthernet0/0

ip address 12.1.1.2 255.255.255.0

duplex auto

speed auto

!

interface FastEthernet1/0

ip address 23.1.1.1 255.255.255.0

duplex auto

speed auto

!

End

R3配置:

hostname R3

!

crypto isakmp policy 10

hash md5

authentication pre-share

group 2

crypto isakmp key zhang address 12.1.1.1

!

!

crypto ipsec transform-set mytrans esp-3des esp-md5-hmac

mode transport

!

crypto map mymap 10 ipsec-isakmp

set peer 12.1.1.1

set transform-set mytrans

match address VPN

!

interface Tunnel0

ip address 172.16.1.2 255.255.255.0

tunnel source FastEthernet0/0

tunnel destination 12.1.1.1

tunnel key 123

!

interface Loopback10

ip address 192.168.30.1 255.255.255.0

!

interface FastEthernet0/0

ip address 23.1.1.2 255.255.255.0

duplex auto

speed auto

crypto map mymap

!

router ospf 1

router-id 3.3.3.3

log-adjacency-changes

network 172.16.1.0 0.0.0.255 area 0

network 192.168.30.0 0.0.0.255 area 0

!

no ip http server

no ip http secure-server

ip route 0.0.0.0 0.0.0.0 23.1.1.1

!

ip access-list extended VPN

permit gre 23.1.1.0 0.0.0.255 12.1.1.0 0.0.0.255

!

End

第二种方法:

在1实验中的基础上,删徐mymap,access-list VPN,在接口上删徐map的应用。

然后:

1. 创建profile

crypto ipsec profile vpnPro

set transform-set mytrans

2. 在tunnel接口上应用

interface Tunnel0

tunnel protection ipsec profile vpnPro

R1和R2都做相同的配置

实验须然简单,但是还是要知道原理的。

原理解析:

R1上ping R3:

Ping 192.168.30.1 source 192.168.10.1 re 100

1. 查路由表转发192.168.30.1

2. 发现到达192.168.30.0/24下一跳走tunnel0口,要GRE封装。

3. Tunnel0口的tunnel destination是23.1.1.2,由于没有这条的路由条目,所以匹配默认路由,下一跳12.1.1.2,从F 0/0出去。

4. 在F 0/0下有一个map ,map内面绑定的ip access-list VPN。条件从192.168.10.0/24到达192.168.30.0/24,判断是否满足。->满足

5. 满足,所以要ipsec封装再出去。

6. 全过程,tunnel->f 0/0->ipsec封装->出去

如果是用profile,那么路由又是怎么走的昵?profile没有map,没有ip access-list VPN。

R1上ping R3:

Ping 192.168.30.1 source 192.168.10.1 re 100

1. 查路由,走tunnel0,要GRE封装。

2. Tunnel0上有profile,所以凡是走tunnel0的数据都要保护。tunnel destination是23.1.1.2,走默认路由,IPSEC封装。

3. 从F 0/0出去

篇三:GRE over IPSEC配置

专科生毕业设计

网 络 工 程

路由交换方向

院 系 软件学院

专 业

班 级 09网专2班

学 号 1601090238

学 生 姓 名 马鹏飞

联 系 方 式

指 导 教 师

职 称

2011年5月

独 创 性 声 明

本人郑重声明:所呈交的毕业论文(设计)是本人在指导老师指导下取得的研究成果。除了文中特别加以注释和致谢的地方外,论文(设计)中不包含其他人已经发表或撰写的研究成果。与本研究成果相关的所有人所做出的任何贡献均已在论文(设计)中作了(本文来自:WwW.dXf5.coM 东星 资源网:greipsec配置)明确的说明并表示了谢意。

签名:

年 月 日

授权声明

本人完全了解许昌学院有关保留、使用专科生毕业论文(设计)的规定,即:有权保留并向国家有关部门或机构送交毕业论文(设计)的复印件和磁盘,允许毕业论文(设计)被查阅和借阅。本人授权许昌学院可以将毕业论文(设计)的全部或部分内容编入有关数据库进行检索,可以采用影印、缩印或扫描等复制手段保存、汇编论文(设计)。

本人论文(设计)中有原创性数据需要保密的部分为: 。

签名: 年 月 日

指导教师签名:

年 月日

摘 要

全球性的国际计算机互连网Internet的迅速发展和普及,改变了整个信息产业的面貌,使信息技术产业从以计算机为中心发展到以网络为中心,并为计算机技术在工业、商业、教育及科研等领域中的应用提供了一个全新的网络通信环境,也从根本上加强并促进了群体工作成员之间的信息交流、资源共享、科学计算及技术合作等,进而推动了教育事业、科研及生产的发展。Internet是一个全球性的开放的信息互连网络,它是以一系列关键支撑技术为核心发展起来的新兴领域,为人们提供了崭新的网络计算环境。

随着网络的逐步普及,中小型企业的建设是企业向信息化发展的必然选择,企业网络系统是一个非常庞大而复杂的系统,它不仅为企业现代化、综合信息管理和办公自动化等一系列应用提供基本操作平台,而且能提供多种应用服务,使信息能及时、准确地传送给各个系统。而中小型企业工程建设中主要应用了网络技术中的重要分支局域网技术来建设与管理的,因此本毕业设计课题将主要以中小型局域网络建设过程可能用到的各种技术及实施方案为设计方向,为中小型企业的建设提供理论依据和实践指导。

本课题共分34章,主要包括二大方面:windows和Linux。Windows主要内容包括windows server 2003的安装与基本配置、windows server 2003系统管理、windows网络配置、windows DNS和DHCP服务器等;Linux主要内容包括Linux操作系统的安装与基本配置、Linux网络配置、samba服务器、ftp服务器、DNS服务器等各种网络服务器的安装与配置。本项目也解决了企业局域网之间的VPN搭建以及路由器和交换机的配置。https://2017xingcai.com/

关键词:局域网搭建;Linux服务器配置;windows管理;路由与交换配置

ABSTRACT

Global international computer Internet rapid development and popularization of Internet,Changed the face of the entire information sector, from information technology industry in the development of computer center with Internet for center to,Computer technology in industrial and commercial education andComputer technology in industrial and commercial education and research the application fields such as provided a new network communication environmentresearch the application fields such as provided a new network communication environment,Also fundamentally strengthening and promoting between members of the group work exchange of information resources sharing scientific computing and technical cooperation, etc, thus boosts the education scientific research and production of development business。The Internet is a global open information, it is in a series of interconnection network key supporting technology as the core, the emerging field developed to provide a new network computing environment。

Along with the network popularization, the small and medium-sized enterprises gradually to the informatization construction of enterprise is the inevitable choice for the development of, enterprise network system is a very large and complex system, it is not only for enterprise modernization and comprehensive information management and office automation and so on a series of applied to provide basic operation platform, and can provide various application service, make the information can timely, accurately transmitted to each system. And small and medium enterprises mainly used in engineering construction network technology to an important branch of LAN technology, the construction and management of graduation design topic, so this will mainly smhttps://hlbeemo.com/all and medium-sized local area network construction process may use different techniques for the design and implementation plan for small and medium enterprises, the direction of construction to provide the theory basis and the practical guidance.

This topic is divided into 34 chapters, mainly including the largest aspects: Windows and Linux. Windows main contents include Windows server 2003 installation and basic configuration, Windows server 2003 system management, Windows network configuration, Windows DNS and a DHCP server etc; Linux main content includes the Linux operating system installation and basic configuration, Linux network configuration, samba server, FTP server, the DNS server, etc. This program also include enterprise LAN and the VPN structures between the router and switch configuration.

Keywords: LAN build; Linux server configuration; Windows management; Routing and switching configuration

目录

第1章 引言……………………………………………………………………….1

第2章 项目前需求分析………………………………………………………….1

2.1 项目背景……………………………………………………………………………..1

2.2 需求分析……………………………………………………………………………..1

第3章 网络总体建设目标……………………………………………………….2

3.1 网络建设目标………………………………………………………………………..2

3.2 网络及系统建设内容及要求………………………………………………………..2

3.3 网络设计原则………………………………………………………………………..3

第4章 网络总体设计……………………………………………………………..4

4.1 网络总体拓扑图……………………………………………………………………..4

4.2 网络层次化设计……………………………………………………………………..4

4.2.1 核心层设计…………………………………………………………………………………5

4.2.2 汇聚层设计…………………………………………………………………………………5

4.2.3 接入层设计…………………………………………………………………………………6

4.3 内联接入……………………………………………………………………………...6

第5章 路由、交换设计……………………………………………………………6

5.1 设备选择……………………………………………………………………………...6

5.2 设备命名规范………………………………………………………………………...7

5.3 VLAN、子网及IP地址规

(192.168.1.0-6.0)……https://lwczkj.com/…………………………….7

5.4 路由协议……………………………………………………………………………..10

5.5 交换技术……………………………………………………………………………..10

5.6 IPV6…………………………………………………………………………………..10

第6章 服务器设计…………………………………………………………………11

6.1 服务器的系统选择…………………………………………………………………..11

6.2 DNS、DHCP 、FTP、 Mail、 Web-Apache服务器……………………………..11

第7章 网络安全解决方案…………………………………………………………13

7.1 网络边界安全威胁分析……………………………………………………………..13

7.2 网路内部安全威胁分析……………………………………………………………..13

7.3 解决方案……………………………………………………………………………..14

7.3.1 ISA防火墙和iptables防火墙……………………………………………………………..14

7.3.2 病毒防护技术………………………………………………………………………………14

7.3.3 认证和数字签名技术………………………………………………………………………14

第8章 关键技术介绍………………………………………………………………15

8.1 HSRP…………………………………………………………………………………15

8.2 VLAN………………………………………………………………………………...15

8.3 VTP…………………………………………………………………………………...17

8.4 TRUNK……………………………………………………………………………….17

8.5 STP…………………………………………………………………………………....18

8.6 VPN…………………………………………………………………………………...18

8.7 Etherchannel技术…………………………………………………………………….19

8.8 DNS……………………………………………………………………………………19

8.9 DHCP………………………………………………………………………………….20

8.10 PIX防火墙技术………………………………………………………………………20

标签:配置 greipsec 方舟配置 iis配置