2

我想在我的 DockerHost 上设置 strongswan,以允许 leftSubnet 上的容器(docker 网络子网)与 IPSEC TUNNEL 中的 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

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

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

4

0 回答 0