I am trying to use Amazon AWS Cloudfront Geo to whitelist few specific countries and block access from anywhere else. So far I did this:
1) enabled Geo restriction on the Cloudfront distribution in a whitelist mode, added (for a test) just Israel to make sure it is available here. To be sure invalidated the whole website (the website is statically hosted on S3).[Attached config from AWS for sanity check]
2) To test tried accessing it from various EC2 instances around the world - looks good, always got 403 error. Still seemed not 100% full proof so:
3) Tried accessing the website using Tor browser with different exit points in US/UK/Germany and ... always get to the website, no block whatsoever. Tried at least from 20 different geo IPs [some of the tests are attached]. My idea so far is:
either testing from AWS infrastructure is not relevant and AWS Geo does not restrict anything
or it does restrict as advertised EXCEPT Tor traffic, then it is half the problem , still why not? After all Tor is just webtraffic from IP...
or I do something wrong in Geo configuration. For testing, should it be needed I did all this on https://lifeinisrael.co.il my hobby non-production site so I can mess with it freely.