我在AWS中使用Red Hat 7的EC2,我需要通过VPN将它连接到networking。
我按照这里的说明https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide/sec-Securing_Virtual_Private_Networks.html#sec-IPsec_VPN_Using_Libreswan在Red Hat上安装和configurationLibreswan。
到VPN的连接已build立,但路由不起作用。 我无法从远程networking中的主机获得响应。
ipsec的configuration是这样的:
conn site-to-site type=tunnel authby=secret auto=route ike=3des-sha1 phase2=esp phase2alg=3des-sha1 nat-ikev1-method=rfc pfs=no forceencaps=yes left=%defaultroute leftid={elastic_ip} leftsourceip=172.31.34.9 leftsubnet=172.31.34.9/32 right={remote_ip} rightid={remote_ip} rightsourceip=192.168.253.155 rightsubnet=192.168.253.155/32
任何帮助解决这个问题?
在IRC #swan的@bleve和@LetoTo的帮助下,我改变了这样的configuration:
left={local_ip} leftid={elastic_ip} leftsourceip={elastic_ip} leftsubnet={elastic_ip}/32
现在工作。 连接VPN后,该行添加到路由表中:
192.168.253.155 dev eth0 scope link src 52.6.108.86