微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

带Docker网络子网的Strongswan IPSEC IKE

如何解决带Docker网络子网的Strongswan IPSEC IKE

我想在DockerHost上设置Strongswan,以便允许在Leftsubnet(这是Docker网络子网)上的容器与IPSEC隧道中的rightsubnet通信。

10.0.10.0/24是我在DockerHost上的leftsubnet是使用以下方式创建的:

docker network create --subnet 10.0.10.0/24

DockerHost上的IPSEC IKE配置:

conn VPN-DOCKERHOST-REMOTE
    authby=secret               #this specifies how the connection is authenticated
    auto=start                  #start the connection by default
    type=tunnel                 #the type of connection
    left=1.1.1.1                #This is the public ip address of server MAESTRIA
    leftsubnet=10.0.10.0/24     #This is the subnet/private ip of server MAESTRIA
    right=2.2.2.2               #This is the public ip address of server RESAMUT/Remote Server
    rightsubnet=10.1.1.0/24     #This is the subnet/private ip of server RESAMUT
    ike=aes128-sha256-modp3072  #Internet key exchange,type of encryption keyexchange=ikev2 #Internet key exchange version
    ikelifetime=28800s          #Time before re authentication of keys
    esp=aes128-sha256           #Encapsulation security suite of protocols

我的DockerHost和RemoteServer之间的IPSEC IKE已启动,但是我无法从我的容器ping到远程子网。

我认为,由于iptables之类的原因,与我的容器中的远程子网匹配的流量被路由到隧道之外,但是我无法解决问题。

有人可以帮我吗?

感谢您的帮助,

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?