接口端点 - 如何确保流量通过端点进行
我有一个使用VPC向导
- ONE AZ
- ONE子网创建的VPC,一个私人子网一个
- NAT Gateway One Gateway
- One Gateway端点
,然后手动为EC2手动创建了一个接口端点,
我在私有子网中启动了EC2,也在私有子网中启动了一个bastion主机,并在公共子网(以便我可以在私有子网中向EC2进行SSH)
问题:在创建到EC2的接口端点后,我如何确保/检查流量是否越过端点而不是Internet?
有多种方法可以检查网关端点的此行为 - 如图所示在这里
预先感谢。
I have a VPC created using the VPC wizard
- one AZ
- one Public subnet, one Private subnet
- one NAT Gateway
- one Gateway Endpoint for S3
I then manually created a Interface Endpoint for EC2
I launched a EC2 in the private subnet and also a bastion host in the public subnet (so that I can ssh to the EC2 in private subnet)
The question: After creating the Interface Endpoint to EC2, how do I ensure/check that the traffic is going over the endpoint and not the internet?
There are ways to check this behavior for the Gateway Endpoint - as shown here
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
谢谢@marcin和@ervinszilagyi,
事实证明,我需要
在启用端口443(https)上的入站规则后的
,我可以进行这些测试以确认仅通过接口端点才会发生连接。注意:我在下面显示
awsbatch
的示例 - 对于任何接口端点,都可以执行相同的操作(如果尝试其他端点,例如SES SMTP端点,请确保您更改适当的端口号码命令
)sudo traceroute -n -t -p 443批次。<区域> .amazonaws.com
关闭telnet连接的有用链接 - 我很难正确获得逃生角色: https://www.redhat.com/sysadmin/sysadmin/telnet-netcat-troubleshooting
现在,如果我做过批处理接口端点的DNS名称> ,它会给我以上2个命令和其他有用信息所反映的IP地址。
其他有用的链接:
希望这会有所帮助全部。
Thanks @Marcin and @ErvinSzilagyi
Turns out that I needed to have the relevant inbound rules in my SG
After I enabled inbound rules on port 443 (https), I could do these tests to confirm connectivity happens only via Interface Endpoint.
Note: I am showing examples below for
awsbatch
- the same can be done for any Interface Endpoint (if trying a different endpoint like say smtp endpoint, make sure you change the appropriate port number in the command
)sudo traceroute -n -T -p 443 batch.< region >.amazonaws.com
sudo telnet batch.< region >.amazonaws.com 443
Useful link for closing Telnet connections - I had trouble getting the escape characters correct : https://www.redhat.com/sysadmin/telnet-netcat-troubleshooting
Now, if I did sudo nslookup < DNS Name of Batch Interface Endpoint > , it would give me the IP address reflected by the above 2 commands and other useful info.
Other useful links:
Hope this will help all.