Amazon EC2 Creating Tunnel with OpenVPN

Posted by nocode on Server Fault See other posts from Server Fault or by nocode
Published on 2013-10-08T21:54:56Z Indexed on 2013/10/23 3:57 UTC
Read the original article Hit count: 445

Filed under:
|
|
|

I have followed these instructions: http://aws.amazon.com/articles/0639686206802544

I can ping the VPN endpoints and I have the corresponding VPC CIDR pointing to the EC2 instance in the route table. Here is my config:

port 1194
proto udp
dev tun

# Remote peer and network
remote Elastic_IP
route 10.0.0.0/16

# Configure local and remote VPN endpoints
ifconfig 169.254.255.1 169.254.255.2

# The pre-shared static key
secret /etc/openvpn/ovpn.key

keepalive 10 120
persist-key
persist-tun
log /var/log/openvpn.log
verb 3

When I look at my logs, I get this error:

RESOLVE: Cannot resolve host address: 10.0.0.0/16: Name or service not known
OpenVPN ROUTE: failed to parse/resolve route for host/network: 10.0.0.0/16

in VPC1, the CIDR is 172.31.0.0/16 which is targeting the EC2 instance also running OpenVPN. I'm getting the same error from the Instance in VPC2 with the corresponding CIDR. Just for testing, i stopped the IPTABLES service

I am running the Amazon linux AMI image (x64) as specified in the article I linked.

© Server Fault or respective owner

Related posts about amazon-ec2

Related posts about vpn