3

May be it's little bit odd, but yes i want to make connection between AWS VPC and my PC/LAN, so i can ping any EC2 instance using their Private IP.

More Details: I'm using AWS Directory Service(DS) and trying to add my PC under AWS DS. But AWS DS is VPC specific. We can't access DS DNS address outside the VPC. Hence I think if i able to connect my PC under VPC network then it can be possible to ping AWS DS DNS.

2
  • The only way that I can think of is using AWS Direct Connect (aws.amazon.com/directconnect), which is to connect your on-premises infrastructure and AWS infrastructure. Commented Aug 24, 2015 at 6:47
  • just adding fyi: direct connect is a particular solution, and quite expensive
    – Tom
    Commented Aug 24, 2015 at 7:14

4 Answers 4

5

This is not odd at all and very common. One easy way to do that is to use an vpn solution, e.g by deploying an openvpn VM from an openvpn AMI (almost everything is configured by default), or by installing another vpn solution on one of your instance. Then, you will only have to log to this vpn and you will be able to resolve your instances with their private IP addresses

However, if you do want your instances to be routed between your LAN/VPC, this is slightly more complicated. you may have to consider using a more complex architecture, still based on VPN but with "Virtual Private Gateway / customer gateway" configuration

2
  • Thanks, @Tom. OpenVPN is awesome. It took 10-15 minutes to setup VPN Tunnel and some more time for adding my PC under DS. One suggestion from my side, instead of doing manual setup you can use AWS Marketplace AMI OpenVPN AMI It is easy to setup. Commented Aug 24, 2015 at 12:45
  • happy to help @Nitin Patil :) I agree with you, that 's what I mean by "from an openvpn AMI", but maybe it is not clear. Thanks for sharing the link!
    – Tom
    Commented Aug 24, 2015 at 13:05
2

In addition to running OpenVPN on AWS you could also use a VPC Virtual Private Gateway.

http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html

You would set up a deice on your side (usually the router or firewall) and connect it to the VPC via a VPN tunnel to an Amazon VPN endpoint. This solution would make it easy to add multiple hosts on your LAN to the DS without having to connect them all via individual VPN connections.

Edit: This popped up again so I thought I'd add I did a writeup on using Pritunl for something like this a couple months after posting this answer. I've been managing Pritunl Enterprise since then and with ~150 users daily or so it's been performing wonderfully even with just t2.medium hosts and another for the Mongo database.

https://www.nathanv.com/2015/11/09/pritunl-for-aws-vpc/

1

Best self-explanatory YouTube Video for installing OpenVPN for this you need to use AWS Marketplace AMI - OpenVPN

0

A pretty standard site to site type VPN should do the trick. IPSEC or OpenVPN from a gateway on your premises to an instance on AWS that is bridged / routed onto your private AWS network.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .