简体   繁体   English

AWS Cloudfront 黑名单,通过 VPN 访问

[英]AWS Cloudfront blacklist, access via VPN

I'm setting up AWS Cloudfront Management.我正在设置 AWS Cloudfront Management。 I'm blacklisting several countries of the world (eg: China).我将世界上几个国家(例如:中国)列入黑名单。 If someone from China uses a VPN via another country, can they still get access?如果来自中国的人通过另一个国家使用 VPN,他们还能访问吗? Does the blacklist protect against access via VPN?黑名单是否可以防止通过 VPN 访问?

From the AWS documentation :AWS 文档

CloudFront determines the location of your users by using a third-party GeoIP database. CloudFront 使用第三方 GeoIP 数据库确定用户的位置。 The accuracy of the mapping between IP addresses and countries varies by Region. IP 地址和国家/地区之间的映射精度因地区而异。 Based on recent tests, the overall accuracy is 99.8%.根据最近的测试,总体准确率为 99.8%。 If CloudFront can't determine a user's location, CloudFront serves the content that the user has requested.如果 CloudFront 无法确定用户的位置,CloudFront 会提供用户请求的内容。

When users access your service through a VPN, their real IPs are hidden, and what you see is the IP of the server.当用户通过VPN访问你的服务时,他们的真实IP是隐藏的,你看到的是服务器的IP。 Hence the geo-restriction will be mostly ineffective.因此,地理限制将大多无效。

You can mitigate the use of VPNs to some extent by limiting the number of discrete sessions sharing a single IP.您可以通过限制共享单个 IP 的离散会话的数量来在一定程度上减轻 VPN 的使用。 This can (for example) be achieved with Lambda@Edge and DynamoDB .这可以(例如)通过Lambda@EdgeDynamoDB来实现。

To complement @aymericbeaumet answer.补充@aymericbeaumet 的答案。 You could also setup WAF in front of CloudFront.您还可以在 CloudFront 前设置WAF

In WAF you could use AWS Managed Rules rule group called AWSManagedRulesAnonymousIpList :在 WAF 中,您可以使用名为AWSManagedRulesAnonymousIpList 的AWS 托管规则规则组:

This rule group contains rules to block requests from services that allow the obfuscation of viewer identity.此规则组包含阻止来自允许混淆查看者身份的服务的请求的规则。 These include requests from VPNs , proxies, Tor nodes, and hosting providers.其中包括来自VPN 、代理、Tor 节点和托管服务提供商的请求。 This rule group is useful if you want to filter out viewers that might be trying to hide their identity from your application.如果您想要过滤掉可能试图在您的应用程序中隐藏其身份的查看器,则此规则组很有用。 Blocking the IP addresses of these services can help mitigate bots and evasion of geographic restrictions.阻止这些服务的 IP 地址有助于缓解爬虫程序和规避地理限制。

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

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