- Newest
- Most votes
- Most comments
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 -
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
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.
Relevant content
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 4 months ago
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.