我成功地将Speak的私有子网添加到中心的左侧子网中,从而连接了合作伙伴,并且每个合作伙伴都应该将其他私有合作伙伴的子网作为右侧子网。您还必须将合作伙伴的子网添加到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
您必须确保没有私有子网重叠。