简体   繁体   English

RDS 通过 VPN 连接

[英]RDS connect via VPN

My MySQL database stored in AWS RDS.我的 MySQL 数据库存储在 AWS RDS 中。 I need to connect this database to my website which is hosted by another provider.我需要将此数据库连接到由另一个提供商托管的我的网站。 But I don't have a public IP in AWS.So they told connect via VPN.但是我在 AWS 中没有公共 IP。所以他们告诉通过 VPN 连接。 How can I do this?我怎样才能做到这一点?

There is no need of external VPN provider.不需要外部 VPN 提供商。 You can create an site-to-site IPsec VPN from your third party network to the RDS AWS VPC.您可以创建从第三方网络到 RDS AWS VPC 的站点到站点 IPsec VPN。 It's not much complicated.这并不复杂。 There are lot of docs available in the AWS documentation page. AWS 文档页面中有很多可用的文档。 If you want you can go through the below links.如果你愿意,你可以通过下面的链接。

AWS VPC N/W Guide AWS VPC N/W 指南

AWS Scenarios for Accessing a DB Instance in a VPC 访问 VPC 中的数据库实例的 AWS 场景

AWS Setting Up an AWS VPN Connection AWS 设置 AWS VPN 连接

This is a really broad question.这是一个非常广泛的问题。 Do you have a device on the local network that can support an IPSec tunnel to AWS?您在本地网络上是否有可以支持到 AWS 的 IPSec 隧道的设备? For example, I use SonicWall TZ400, but there are many, many devices from many, many vendors that support this functionality.例如,我使用 SonicWall TZ400,但是有许多来自许多供应商的许多设备支持此功能。

If you don't have such a device, you'll need to get one.如果你没有这样的设备,你需要得到一个。

Then, you need to configure your VPC (I assume your RDS instance is in a VPC, and that the RDS instance sits in a subnet that is private (no public IP address is assigned)?然后,您需要配置您的 VPC(我假设您的 RDS 实例位于 VPC 中,并且 RDS 实例位于私有子网中(未分配公共 IP 地址)?

Assuming that you have a local, physical network device that supports IPSec tunnels, you'll need to define a Customer Gateway (CGW) a Virtual Private Gateway (VPW), and a VPN connection.假设您有一个支持 IPSec 隧道的本地物理网络设备,您需要定义一个客户网关 (CGW)、一个虚拟专用网关 (VPW) 和一个 VPN 连接。

It's not as hard as it sounds, but there are several steps involved.这并不像听起来那么难,但涉及几个步骤。

See here for detailed steps: https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/SetUpVPNConnections.html有关详细步骤,请参阅此处: https : //docs.aws.amazon.com/AmazonVPC/latest/UserGuide/SetUpVPNConnections.html

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM