标签: gre

无法删除 GRE 隧道

我正在 Linux 2.6.26 中配置 GRE 隧道,但我遇到了一个非常奇怪的问题,我找不到任何解决方案。

我创建了一个名为 的 GRE 隧道gre0,但无论我做什么,我都无法删除这条隧道。命令ip tunnel del gre0失败并返回响应ioctl: Operation not permitted。任何更改隧道地址的尝试也会失败。

以下命令说明了问题:

# ip tunnel del gre0
ioctl: Operation not permitted
# ip tunnel change gre0
# ip tunnel change gre0 remote <some address> local <some address>
ioctl: No such file or directory
Run Code Online (Sandbox Code Playgroud)

我可以毫无问题地创建、更改和删除其他隧道,但gre0只是停留在那里并且不会消失,即使我重新启动或关闭接口。

如果我移除ip_gre模块,隧道就会消失。一旦我再次插入模块,就会gre0再次出现并且问题仍然存在。

我有两个问题:

  1. 我该怎么做才能摆脱这个讨厌的隧道?我怀疑这可能是内核或模块错误。
  2. 这种持久性数据(在这种情况下, 的信息gre0,但这适用于我什至可能不知道的任何其他设置)存储在哪里?

如果需要任何其他信息,请告诉我。

非常感谢您的帮助。

linux tunneling gre

16
推荐指数
2
解决办法
2万
查看次数

GRE 隧道 TTL 编号

这是服务器A上的设置:

iface serverA_gre0 inet tunnel
        address 172.24.0.85
        mode gre
        endpoint x.x.x.x
        dstaddr 172.24.0.86
        netmask 255.255.255.252
        ttl 255
Run Code Online (Sandbox Code Playgroud)

服务器 B 上的设置:

iface serverB_gre0 inet tunnel
        address 172.24.0.86
        mode gre
        endpoint x.x.x.x
        dstaddr 172.24.0.85
        netmask 255.255.255.252
        ttl 255
Run Code Online (Sandbox Code Playgroud)

没有“ttl 255”:

traceroute to 172.24.0.86 (172.24.0.86), 30 hops max, 60 byte packets
 1  * * *
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  172.24.0.86  54.507 ms  62.888 ms  51.369 ms
Run Code Online (Sandbox Code Playgroud)

使用“ttl 255”:

traceroute to …
Run Code Online (Sandbox Code Playgroud)

networking gre

7
推荐指数
1
解决办法
2718
查看次数

PPTP 连接失败,错误为 800/806

我有一个客户端(Server 2008 R2)无法连接到我们的生产环境 PPTP VPN 服务器(Server 2003,运行 RRAS)。

服务器位于打开 TCP1723 和 GRE 的防火墙后面。我们办公室的其他客户能够正常连接。我们的办公室位于瞻博网络 SSG5-Serial 防火墙后面,但允许所有传出流量,并且多个其他客户端能够毫无问题地连接到 VPN 服务器。

我还在办公室外的另一个网络上设置了一个完全不同的 VPN 服务器。正常运行的客户端连接得很好 - Server 2008 R2 机器没有。因此,这绝对是这台机器的问题。

我已经重新启动了。我已经禁用了防火墙,两者都没有。

我已经在服务器/客户端上运行了 PPTPSRV 和 PPTPCLNT,它们能够完美地进行通信 - 表明使用 TCP1723 和 GRE 都没有问题。

Server 2008 R2 机器本身也作为 VPN 服务器运行(传入连接),并且运行良好。无论是否有活动的传入连接,我们都会遇到问题。

我不确定我的下一个调试步骤是什么;有什么建议?

编辑:服务器上的事件日志有来自 RasMan 的以下警告:

A connection between the VPN server and the VPN client xxx.xxx.xxx.xxx has been 
established, but the VPN connection cannot be completed. The most common cause
for this is that a firewall or router between …
Run Code Online (Sandbox Code Playgroud)

firewall pptp connection windows-server-2008-r2 gre

6
推荐指数
1
解决办法
1万
查看次数

如何使用 GRE 隧道通过 server_B 路由 server_A 的互联网流量?

我有两台 Linux 服务器。我想使用 GRE 隧道将所有互联网流量从 ClientBox 通过隧道路由到 GatewayBox,这样,对于互联网的其余部分,我的 ClientBox 看起来就是 GatewayBox,这样我就可以将 GatewayBox 的外部 IP 用于所有 ClientBox互联网使用。我已经在它们之间建立了一条 GRE 隧道(代理无法满足我的特定需求)。

我的 GRE 隧道工作了!我可以 ping 两端。

现在我需要配置 GatewayBox 以实际将这些传入连接从 ClientBox 路由到互联网并返回到 ClientBox。所以我运行了以下脚本:

#! /bin/bash

IPTABLES=/sbin/iptables

WANIF='ens3' # servers from this company use ens3 instead of eth0, it seems
LANIF='gre1' # both boxes have the gre tunnel set up as gre1

# enable ip forwarding in the kernel
echo 'Enabling Kernel IP forwarding...'
/bin/echo 1 > /proc/sys/net/ipv4/ip_forward

# flush rules and delete chains …
Run Code Online (Sandbox Code Playgroud)

route iptables gre

5
推荐指数
0
解决办法
833
查看次数

1
推荐指数
1
解决办法
5224
查看次数

PPTP Passthrough Centos 7/Firewalld 路由器到 Windows Server

我有一台运行 firewalld 的 Centos 7 服务器,以允许公共服务访问单独 VLAN(双 NIC)上的内部服务。我导入了一个 Windows VM,但我不知道需要设置什么规则来允许 GRE 通过 firewalld,而不是打开 1723。我在网上找到的所有问题和指南都没有在 Centos 7 机器上设置 PPTP 本身,而不是将其传递到路由 IP(在本例中为 Windows 服务器)。

firewall pptp gre firewalld centos7

1
推荐指数
1
解决办法
4662
查看次数