使用GRE协议建立IPSEC
今天给大家介绍另一种常见的IPSEC 建立场景,利用GRE协议,建立。阅读本文,您需要有一定的IPSEC 基础知识以及常见配置基础,对此不熟悉的同学可以查阅本博客的其他文章。
推荐阅读:
IPSEC 简介
IPSEC 配置实例
一、实验拓扑及要求
首先给出实验拓扑:
要求在R1和R3上打一条GRE隧道,通过GRE隧道,实现IPSEC ,以实现PC1和PC2之间互通。
二、配置讲解说明
(一)IPSEC 相关配置
acl number 3000 rule 5 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255
ipsec proposal IPSEGesp encryption-algorithm 3des
#
ike proposal 10encryption-algorithm 3des-cbcdh group2authentication-algorithm md5
#
ike peer R3 v1pre-shared-key simple admin
#
ipsec profile IPSEC_PROike-peer R3proposal IPSEG
上述配置主要是配置IPSEC的相关内容,与之前文章中介绍的普通情况下IPSEC配置相比,在GRE隧道中配置IPSEC,不是使用的ipsec policy,而是使用的ipsec profile。此外,在ike peer配置中,这里也不用指定对端IP地址。
(二)GRE相关配置
interface Tunnel0/0/0ip address 100.1.1.1 255.255.255.0 tunnel-protocol gresource 150.1.1.1destination 150.1.2.3ipsec profile IPSEC_PRO
以上是GRE Tunnel的相关配置,在配置时,要注意destination要成对方实际接口的IP地址,而不是Tunnel接口的IP地址。
三、附录——配置命令
R1:
acl number 3000 rule 5 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255
#
acl number 3001 rule 5 deny ip source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255 rule 10 permit ip source 192.168.1.0 0.0.0.255
#
ipsec proposal IPSEGesp encryption-algorithm 3des
#
ike proposal 10encryption-algorithm 3des-cbcdh group2authentication-algorithm md5
#
ike peer R3 v1pre-shared-key simple admin
#
ipsec profile IPSEC_PROike-peer R3proposal IPSEG
#
interface GigabitEthernet0/0/1ip address 150.1.1.1 255.255.255.0 nat outbound 3001
#
interface GigabitEthernet0/0/2ip address 192.168.1.1 255.255.255.0
#
interface Tunnel0/0/0ip address 100.1.1.1 255.255.255.0 tunnel-protocol gresource 150.1.1.1destination 150.1.2.3ipsec profile IPSEC_PRO
#
ip route-static 0.0.0.0 0.0.0.0 Tunnel0/0/0
R3:
acl number 3000 rule 5 permit ip source 192.168.2.0 0.0.0.255 destination 192.168.1.0 0.0.0.255acl number 3001 rule 5 deny ip source 192.168.2.0 0.0.0.255 destination 192.168.1.0 0.0.0.255 rule 10 permit ip source 192.168.2.0 0.0.0.255
#
ipsec proposal IPSECesp encryption-algorithm 3des
#
ike proposal 10encryption-algorithm 3des-cbcdh group2authentication-algorithm md5
#
ike peer R1 v1pre-shared-key simple adminike-proposal 10
#
ipsec profile IPSEC_PROike-peer R1proposal IPSEC
#
interface GigabitEthernet0/0/0ip address 150.1.2.3 255.255.255.0 nat outbound 3001
#
interface GigabitEthernet0/0/2ip address 192.168.2.3 255.255.255.0
#
interface Tunnel0/0/0ip address 100.1.1.3 255.255.255.0 tunnel-protocol gresource 150.1.2.3destination 150.1.1.1ipsec profile IPSEC_PRO
#
ip route-static 0.0.0.0 0.0.0.0 Tunnel0/0/0
原创不易,转载请说明出处:https://blog.csdn.net/weixin_40228200/article/details/118558721
使用GRE协议建立IPSEC相关推荐
- GRE协议浅析-IELAB
1.GRE的概念 1)全称:GRE(Generic Routing Encapsulation):通用路由封装协议. 2)功能:定义了在一种网络层协议上封装另一种协议(或同一种协议). 3)举例:对某 ...
- 14.3 GRE协议基础配置
原理概述 GRE(Generic Routing Encapsulation,通用路由封装协议)提供了将一种协议的报文封装在另一种协议报文中的机制,使报文能够在异种网络(如IPv4网络)中传输,而异种 ...
- GRE协议与传输模式下IPSec隧道
以下根据strongswan代码中的testing/tests/route-based/net2net-gre/中的测试环境,来看一下GRE报文通过IPSec隧道的情况.拓扑结构如下: 拓扑图中使用到 ...
- ×××安全协议之IPsec
IPSec协议简介 IPSec协议是一系列网络安全协议的总称,它是由IETF(Internet Engineering Task Force,Internet工程任务组)开发的,可为通讯双方提供访问控 ...
- 互联网协议安全IPSec
IPSec 可为通信两端设备提供安全通道,比如用于两个路由器之间以创建点到点 VPN,以及在防火墙和 Windows 主机之间用于远程访问 VPN等. IPSec(互联网协议安全)是一个安全网络协议 ...
- 实验8:GRE协议的配置
实验8:GRE协议的配置 一.实验目的和要求 目的:掌握GRE的工作原理和RIP协议的配置. 要求:独立完成实验任务和实验报告.截图完整,并辅以必要的文字说明,实验步骤有条理.内容清楚流畅. 二.实验 ...
- eNSP模拟虚拟专用网(使用GRE协议)
目录 实验目的: 实验要求: 实验步骤 1 规划并配置PC机的IP地址 1. PC1: 2. PC2: 2 配置路由器设备接口的IP地址 1. 总部出口路由器: 2. 分公司出口路由器: 3. R3: ...
- 华为IPSEC-×××-典型配置举例1-采用手工方式建立IPsec 安全隧道
华为IPSEC-×××-典型配置举例1-采用手工方式建立IPsec 安全隧道 一:企业组网需求: 1, 某公司(总部在北京)有两个子公司分别在上海和广州,要求通过×××实现公司之间相互通 ...
- TP-LINK路由器与pfSense建立IPsec连接
同一品牌路由器之间进行IPsec连接设置较为简单,但如何与pfSense建立正确的IPsec连接,网上相关的教程却不多见,本文结合自己的实际,对这两种设备之间建立IPsec连接所需的设置进行详细说明. ...
最新文章
- 【CV】吴恩达机器学习课程笔记第10章
- Centos7上openVP-密钥登陆
- 吴渴楨 160809206
- 梅捷SY-A780G+冷启动黑屏,需Reset才能进入系统
- POJ1741 Tree 树中点对统计【树分治入门】
- 物联网软件IoT.js、JerryScript、Smart.js、Calvin介绍
- java异常 json,记一个toJSONString异常
- struts2学习笔记(4)接收参数
- 使用Cassandra和Nutch爬网
- linux struct input_event结构体详解
- @Scheduled定时任务
- arrayfun用法
- 视频截取软件哪个好用?免费的视频截取软件分享
- 多目标跟踪 | 评测指标
- A40I led driver
- android拍照并剪辑
- 自动调制分类发展历程
- HCNA-Security-CBSN构建基础安全网络v2.5视频课程-马青-专题视频课程
- 吃饭困难选择症python_吃饭选择困难症
- 数学建模系列-预测模型(四)马尔可夫预测