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 Antworten
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
beantwortet vor einem Jahr
  • 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
MODERATOR
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen