we are using a free IP -> country database. the accuracy is not perfect. i haven't done extensive testing but i've noticed that using a vpn sometimes returns a neighboring country. maybe has something to do with data center ip ranges moving around