Ip addresses don't need to be tracked for that. It could be done with a proxy that just refuses access to ips not in the right location. although i think it could be very annoying for users. some use tor or vpns, my just keep my websites open to everyone.