Linux 使用Libreswan在AWS上的多VPN IPSec隧道之间配置路由
我已经在AWS上部署了运行Libreswan 3.23-5的RHEL 7.5虚拟机。我已经成功地建立了几个从我的虚拟机到其他6个组织的IPSec隧道。我们希望实现的是中心辐射设置,每个组织只需要一个到AWS(我的VPN VM)的VPN隧道,并且应该能够通过中心的IPSec隧道与其他6个组织进行通信(AMQP)。我已成功让他们ping我的子网,但我希望他们能够ping其他组织的子网。这是我在conf文件中为每个连接或路由表设置的吗?目前,ipsec.d目录下的配置文件只包含leftsunets行中的我的子网,而不包含其他组织Linux 使用Libreswan在AWS上的多VPN IPSec隧道之间配置路由,linux,amazon-web-services,vpn,ipsec,Linux,Amazon Web Services,Vpn,Ipsec,我已经在AWS上部署了运行Libreswan 3.23-5的RHEL 7.5虚拟机。我已经成功地建立了几个从我的虚拟机到其他6个组织的IPSec隧道。我们希望实现的是中心辐射设置,每个组织只需要一个到AWS(我的VPN VM)的VPN隧道,并且应该能够通过中心的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
您必须确保没有私有子网重叠