我想在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之类的原因,与我的容器中的远程子网匹配的流量被路由到隧道之外,但是我无法解决问题。
有人可以帮我吗?
感谢您的帮助,