我在AWS上部署了运行Libreswan 3.23-5的RHEL 7.5 VM。我已经成功地从我的VM到其他6个组织建立了几个IPSec隧道。我们希望实现的是中心辐射设置,每个组织只需要一个到AWS(我的VPN VM)的VPN隧道,并且应该能够通过Hub的IPSec隧道与其他6个组织进行通信(AMQP)。我已成功让他们ping我的子网,但我希望他们能够ping其他组织的子网。这是我在每个连接的conf文件中设置的还是通过路由表?目前,ipsec.d目录下的配置文件只包含leftsunets行中的子网,而不包含其他组织。
conn hub-to-spoke1
type=tunnel
authby=secret
left=%defaultroute
leftid=hub.public.ip.address
leftnexthop=%defaultroute
leftsubnets=hub.subnets.cidr.blocks
right=spoke1.public.ip.address
rightsubnet=spoke1.subnet.cidr.block
pfs=yes
auto=add
ikelifetime=24h
keylife=8h
ike=aes256-sha1;modp1536
phase2=esp
phase2alg=aes256-sha1;modp1024
我们正在使用预共享密钥。为了获得与其他组织的联系,我需要做哪些配置?每个组织必须做什么才能允许其他6个组织通过一个隧道进行连接?我非常感谢任何帮助,因为这是我第一次涉足网络。
我能够通过将辐条的私有子网添加到集线器的左子网来成功连接伙伴,并且每个伙伴应该将彼此的私有伙伴子网作为正确的子网。您还必须将合作伙伴的子网添加到AWS控制台中的路由表。以下是集线器的示例配置文件:
conn hub-to-spoke
type=tunnel
authby=secret
left=%defaultroute
leftid=hub.public.ip.address
leftnexthop=%defaultroute
leftsubnets="all hub subnets and all other spokes subnets"
right=spoke.public.ip.address
rightsubnets="all spoke subnets"
pfs=yes
auto=add
ikelifetime=24h
keylife=8h
ike=aes256-sha1;modp1536
phase2=esp
phase2alg=aes256-sha1;modp1024
对于辐条,这里是一个示例配置
conn spoke-to-hub
type=tunnel
authby=secret
left=%defaultroute
leftid=spoke.public.ip.address
leftnexthop=%defaultroute
leftsubnets="spoke's subnets"
right=hub.public.ip.address
rightsubnet="list of hub's subnets and other spokes subnets"
pfs=yes
auto=add
ikelifetime=24h
keylife=8h
ike=aes256-sha1;modp1536
phase2=esp
phase2alg=aes256-sha1;modp1024
您必须确保没有私有子网重叠。