简体   繁体   English

通过客户端 VPN 终端节点访问 Amazon Elasticsearch Service

[英]Access to Amazon Elasticsearch Service via Client VPN Endpoint

I'm currently learning AWS and I'm stuck.我目前正在学习 AWS,但被卡住了。 I created Amazon Elasticsearch Service domain in my VPC, in subnet A (one of 3 default subnets).我在我的 VPC 中的子网 A(3 个默认子网之一)中创建了 Amazon Elasticsearch Service 域。 The access is available through VPC, not from the Internet.访问是通过 VPC 进行的,而不是通过 Internet 进行的。 I wanted to connect to it from my computer (to create indexes, mappings, etc.) I've read that one of the ways to do that is to connect to VPC using VPN.我想从我的计算机连接到它(以创建索引、映射等)。我读过其中一种方法是使用 VPN 连接到 VPC。

So, I configured AWS Client VPN Endpoint using subnet A and connected from my computer (openVPN).因此,我使用子网 A 配置了 AWS Client VPN 端点并从我的计算机 (openVPN) 连接。 I'm connected, I see my connection in AWS console.我已连接,我在 AWS 控制台中看到了我的连接。 Connection looks ok.连接看起来没问题。

I used Kibana url from AWS console: https://vpc-blablabla.eu-central-1.es.amazonaws.com/_plugin/kibana/ and there is no connection ('ERR_CONNECTION_TIMED_OUT').我从 AWS 控制台使用 Kibana url: https ://vpc-blablabla.eu-central-1.es.amazonaws.com/_plugin/kibana/ 并且没有连接('ERR_CONNECTION_TIMED_OUT')。

AES domain uses security group with ALL income/outcome traffic allowed. AES 域使用允许所有收入/结果流量的安全组。 The DNS resolves domain from the Kibana url properly (It's from subnet A). DNS 从 Kibana url 正确解析域(它来自子网 A)。 Should my IP in VPN match subnet's A CIDR?我在 VPN 中的 IP 应该与子网的 A CIDR 匹配吗? Now it's completely different.现在完全不同了。

Subnet A CIDR: 172.31.0.0/20
VPN Client IPv4 CIDR: 10.5.0.0/20
VPN current IP: 10.5.0.2

Is that a cause of the problem?这是问题的原因吗?

Thank you @jordanm it was caused by wrong routing on my local machine.谢谢@jordanm这是由我本地机器上的错误路由引起的。 To indicate the network to use I had to add route:要指示要使用的网络,我必须添加路由:

sudo ip route add 172.31.0.0/20 via 10.5.0.2 dev tun0

Now it works perfectly.现在它完美地工作。

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

相关问题 通过对等 VPC 访问 AWS 客户端 VPN 终端节点的奇怪行为 - Weird behavior on AWS Client VPN endpoint access through Peered VPC 从 AWS 服务访问位于 VPN 后面的 Rest 端点 - Access Rest Endpoint placed behind VPN from an AWS service 通过 Cloud Formation 创建 Amazon Elasticsearch 服务时出现 CloudWatch 资源访问策略错误 - CloudWatch resource access policy error while creating Amazon Elasticsearch Service via Cloud Formation 如何从亚马逊弹性搜索服务访问Kibana? - How to access Kibana from Amazon elasticsearch service? 带有Amazon Elasticsearch Service的JHipster Elasticsearch - JHipster Elasticsearch with Amazon Elasticsearch Service 在路由表中为 aws 客户端 vpn 端点添加路由以访问 S3 static 网站而不暴露 0.0.0.0/0 - add route in route table for aws client vpn endpoint to access S3 static website without exposing 0.0.0.0/0 无法使用Axis2客户端访问Amazon Web Service - Unable to Access Amazon Web Service using Axis2 client 如何在Amazon Elasticsearch Service中检查Elasticsearch日志? - How to check Elasticsearch logs in Amazon Elasticsearch Service? 连接到Elasticsearch-Amazon Elasticsearch Service-IAM用户 - Connecting to Elasticsearch - Amazon Elasticsearch service - IAM user Elasticsearch 服务与 Cognito — 如何通过 Python HTTP 请求访问 - Elasticsearch Service with Cognito — how to access via Python HTTP request
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM