How to block everyone outside of the US.... LightSail Instance

0

How to block everyone outside of the US.... LightSail Instance...

I am trying to find a way to block all IP's outside the US from coming to my LightSail instances....

Can this be done with Route 53? I am trying to stop it before getting to the instance... please keep in mind I am new to this so I dont know to much about this

2개 답변
0

You can use AWS WAF - https://aws.amazon.com/premiumsupport/knowledge-center/waf-allow-block-country-geolocation/

Another option is to use Firewalls on the Lightsail -

1\ https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-editing-firewall-rules#firewall-adding-rules

2\ https://lightsail.aws.amazon.com/ls/docs/en_us/articles/understanding-firewall-and-port-mappings-in-amazon-lightsail

I have tried on mine and it looks like you can add range of IPs to allow/block. Go to the instance, click networking and from there u can add rules (this will allow traffic up to the instance though). By using AWS WAF you can block traffic hitting before

also R53 allows u to do something similar - https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resolver-dns-firewall.html

Niko
답변함 일 년 전
  • someone downvoted my answer and that is totally fine but I'd appreciate if you can post why my answer is misleading/wrong so I can learn what I did.

  • I think the thing that is missing here is that in order to use WAF, CloudFront or ALB is required - in this case, I'd recommend CloudFront and geo restrictions rather than WAF - but that is also covered in the first link in your answer.

0

Hi,

Thanks for using Lightsail. If you have a specific IP range that you want to restrict, you can use the instance firewall to restrict access: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-editing-firewall-rules

Regardless, I have taken your request as an item that we will follow up with the team internally.

AWS
중재자
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠