简体   繁体   English

如何使用站点到站点 VPN 访问私有子网 EC2

[英]How to Access Private Subnet EC2 with site to site VPN

If I have an AWS VPC with a private and public subnet.如果我有一个带有私有和公有子网的 AWS VPC。 The public subnet has 1 EC2 instance and the private subnet has 1 EC2 instance as well.公共子网有 1 个 EC2 实例,私有子网也有 1 个 EC2 实例。 If I do a site to site VPN to my VPC from my work location.如果我从我的工作地点对我的 VPC 进行站点到站点 VPN。 Can I access my private subnet EC2 instance via ssh using the private ip?我可以使用私有 ip 通过 ssh 访问我的私有子网 EC2 实例吗? Or do I have to do a Bastian host from my public subnet to access my private subnet EC2 instance?或者我是否必须从我的公共子网中创建一个 Bastian 主机才能访问我的私有子网 EC2 实例?

Yes, you will be able to ssh to an e2 instance from your on-premise/work location.是的,您将能够从您的本地/工作位置 ssh 到 e2 实例。 You need to configure routing from your work location to reach to the ec2 instance IP.您需要配置从您的工作位置到 ec2 实例 IP 的路由。 Once that is in place and your security groups allows the incoming connection, then you should be good.一旦到位并且您的安全组允许传入连接,那么您应该会很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何访问托管在私有子网中的 Windows EC2 实例中托管的网站? - How to access web site hosted in Windows EC2 instance, hosted in a Private Subnet? 如何访问私有子网中的 EC2 实例? - How to access to EC2 Instance in private subnet? 如何从另一个私有子网的ec2实例访问私有子网中的RDS实例? - How to access RDS instance which in private subnet from ec2 instance from another private subnet? 私有 su.net 中的 lambda 如何访问公共 su.net 中的 EC2? - How can a lambda inside a private subnet access EC2 in a public subnet? 如何在私有子网中获取 EC2 实例私有 IP? - How to get EC2 instance private IP in a private subnet? 如何在没有域名的情况下访问 AWS EC2 上的站点 - How to access a site on AWS EC2 without a domain name 通过VPN在VPC的专用子网中运行的SSH到EC2实例:连接超时 - SSH to EC2 instance running in a private subnet in a VPC over VPN : connection timed out 如何负载均衡AWS私有子网EC2实例 - How to load balance AWS private subnet EC2 instances 如何等待在专用子网中启动的EC2的用户数据完成? - How to wait for user data completion of EC2 launched in Private Subnet? AWS 如何从私有 su.net 中的 EC2 实例打开网站 - AWS how to open a website from an EC2 instance in the private subnet
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM