<div dir="ltr"><div>Hello all!</div><div><br></div>I'm attempting to create a connection from an AWS EC2 instance (running LibreSwan) to a Juniper SRX240. The SRX240 VPN endpoint has a public IP, and the subnet I'm attempting to route to over the encrypted VPN connection is a public IP. The EC2 instance has a private IP within a VPC, but has an elastic IP assigned to it.<div><br></div><div>Due to limitations on the remote network, RFC1918 network address space can't be routed over the IPsec tunnel.<div><br></div><div>The connection looks like such with `ipsec auto --status`:</div><div><br></div><div>192.168.204.177<192.168.204.177>[xx.xx.xx.xxx (elastic IP in VPC)]...vpn-terminator-public-ip<vpn-terminator-pubic-ip>==<public host ip>/32</div><div><br></div><div>I'm able to successfully establish IPsec SA and ISAKMP SA sessions with the destination VPN terminator endpoint, but I'm unable to ping across the tunnel; the firewall policy on the other side of the tunnel is restricting source packets to be from the elastic IP of the EC2 instance (again, due to RFC1918 space being unroutable for VPN tunnel purposes).</div><div><br></div><div>My ipsec.conf contents:</div><div><br></div><div><div>config setup</div><div>        protostack=netkey</div><div>        nat_traversal=yes</div><div>        virtual_private=%v4:<a href="http://10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12">10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12</a></div><div>        oe=off</div><div>        plutodebug=all</div><div>        plutostderrlog=/var/log/libreswan.log</div><div>        uniqueids=yes</div></div><div><br></div><div>My tunnel conf contents:</div><div><br></div><div><div>conn tunnel1</div><div><br></div><div>        authby=secret</div><div>        auto=start</div><div>        left=192.168.204.177</div><div>        leftid=<elastic ip></div><div>        #leftsubnet=<a href="http://192.168.204.0/22">192.168.204.0/22</a></div><div>        right=<vpn terminator public ip></div><div>        rightsubnet=<public host ip></div><div>        type=tunnel</div><div>        ikelifetime=24h</div><div>        salifetime=1h</div><div>        phase2alg=3des-sha1</div><div>        ike=3des-sha1</div><div>        pfs=yes</div><div>        auth=esp</div><div>        keyingtries=%forever</div><div>        aggrmode=no</div><div>        keyexchange=ike</div><div>        ikev2=never</div><div>        forceencaps=yes</div></div><div><br></div></div><div>Is this type of connection possible from within an AWS VPC?</div><div><br></div><div>Thanks!</div><div>Brandon</div></div>