linux - 无法通过 IPSec 跨 GRE 隧道 ping 远程主机
问题描述
我需要在 IPSec 上设置 GRE 隧道以支持多播,同时加密我的通信。
我设法在 EC2 中设置了 IPSec 隧道(strongswan)。我可以 ping 远程主机,并验证一切正常。
我尝试通过 IPSec 隧道配置 GRE,尽管接口已启动且配置看起来不错,但我无法访问远程主机。
我已经编辑了我的安全组的入站规则以允许 GRE、AH 和 ESP 协议、UDP 端口 4500 和 500 以及 ICMP 协议。
IPSec隧道
My IP: 10.0.0.1
Theirs: 10.0.0.2
GRE隧道
My IP: 10.244.251.210
Theirs: 10.244.251.209
Subnet: 10.244.251.208/30
/etc/网络/接口
auto tun0
iface tun0 inet static
address 10.244.251.210
netmask 255.255.255.252
pre-up ip tunnel add tun0 mode gre local 10.0.0.1 remote 10.0.0.2 ttl 255
up ip link set tun0 multicast on
up ip link set tun0 up
up ip addr add 10.244.251.210/30 dev tun0
ubuntu:~$ ip 路由
default via 172.10.0.1 dev eth0
10.244.251.208/30 dev tun0 proto kernel scope link src 10.244.251.210
ubuntu:~$ ip 地址
5: tun0@NONE: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 8977 qdisc noqueue state UNKNOWN group default qlen 1
link/gre 10.0.0.1 peer 10.0.0.2
inet 10.244.251.210/30 brd 10.244.251.211 scope global tun0
valid_lft forever preferred_lft forever
inet6 fe80::5efe:af4:f68a/64 scope link
valid_lft forever preferred_lft forever
你看到什么错误或遗漏了吗?
谢谢,亚历克斯。
解决方案
推荐阅读
- c - 将十进制定点/浮点格式打印为十六进制
- php - 我在使用 php 获取特定日期函数时遇到问题
- javascript - 使用特殊字符 javaScript 对数组进行排序
- javascript - 如何使用 ajax 和 php 从数据库中获取消息
- python - Python中的可变和不可变对象
- gcloud - 将文件写入 gcloud 存储桶应该很慢吗?
- xaml - 在 Xamarin 表单中同时显示选项卡栏和工具栏
- python-3.x - 按下按钮时如何停止文本标签的闪烁?
- csv - 如何将具有相同列标题的目录中的多个 CSV 文件传递给 JMETER 中的单个 REST API 并使用 1000 个用户进行测试
- html - 我尝试使用所有技术单击按钮。但我无法点击它