Bi-directional access between home PC and AWS EC2 using AWS Client VPN Endpoint

0

I want to connect using ssh to my local PC with AWS Client VPN Endpoint. The VPN Endpoint works and connect to the VPC successfully. I can ssh to an EC2 instance in the VPC from local PC. The EC2 is in a public subnet with CIDR 172.100.0.0/20 (The VPC CIDR is 172.200.0.0/16).

My PC was allocated with an IP 172.302.0.50 in CIDR range 172.301.0.0/16.

Now I am trying to test the connection back to my PC ssh 172.301.0.50 but it fails.

How can I make an EC2 instance access my local PC when my PC is connecting to the Client VPN Endpoint?

3개 답변
2
수락된 답변

AWS ClientVPN will not allow connectivity in reverse direction (AWS to on-premises)

You can look at OpenVPN which does support this.

https://openvpn.net/vpn-server-resources/reach-openvpn-clients-directly-from-a-private-network/

profile pictureAWS
전문가
답변함 일 년 전
profile picture
전문가
검토됨 일 년 전
  • Thank you for the quick reply. Any setup instructions on how to set that up?

0

It's for an EV code signing certificate. The local laptop has the EV USB token and is connected to the internet behind a firewall with no access to. If I setup Openvpn on the local laptop and on the AWS instance CI/CD would that work?

Sam
답변함 일 년 전
  • Still do not understand why you would need to ssh to your laptop? Is this to copy the certificate to the ec2?

0

Using native AWS services would be to use Site to site vpn allows this as that’s what it’s designed for.

Openvpn would work.

Question would be why would you want to ssh to your own machine when you’re connected to it? One work around if you wanted to access your local machine to get round the current issue is a reverse ssh tunnel

profile picture
전문가
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인