2

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.

Nitin Patil
  • 51
  • 1
  • 3
  • The only way that I can think of is using AWS Direct Connect (https://aws.amazon.com/directconnect/), which is to connect your on-premises infrastructure and AWS infrastructure. – serverstackqns Aug 24 '15 at 06:47
  • just adding fyi: direct connect is a particular solution, and quite expensive – Tom Aug 24 '15 at 07:14

4 Answers4

1

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

Tom
  • 616
  • 8
  • 13
  • 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](https://aws.amazon.com/marketplace/pp/B00MI40CAE?ref=cns_srchrow) It is easy to setup. – Nitin Patil Aug 24 '15 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 Aug 24 '15 at 13:05
1

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

Nitin Patil
  • 51
  • 1
  • 3
1

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/

Nathan V
  • 711
  • 5
  • 16
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.

tomstephens89
  • 1,011
  • 1
  • 12
  • 24