Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Geo-blocking -excluding a user from your site based on the user's location.
Is that close enough? Good.
I want to do the opposite.
I want to know how a user can block websites FROM a specified location.
I know I can alter search engines to bring me info from only a specific country's sites.
I want to be able to access all sites EXCEPT those in a certain country. You follow?
That actually sounds quite simple, though I suspect in the end that it won't be.
Where would I be most apt to find concise information about this. would you know by any chance?
as most things asked on LQ, i think it starts with a good article/tutorial/documentation.
you mentioned geo-blocking, not sure that's a linux software, but there are libraries/lists/packages that translate locations to ip ranges for you.
on my system it's called geoip and geoip-database.
i'd start with those, reading all documentation both local and online.
Not sure if will help you but you can use pyaiengine for that. The only thing is that you will need to script in python what you want, but have netfilter support and you can drop/reject domains or protocols easily, I think
Make use of MaxMind's GeoIP services to get things like country details from the visitors IP address and then handle that through whatever application you're using for the site.
Make use of an IP allocation provider to get a hold of the IP blocks for the countries you want to allow and create IP tables entries for each of the blocks you wish to allow access.
I make use of both, the first to match forum registrations with countries and to mark posts from "problematic" countries for checking. I use the second to entirely block a few countries totally at firewall level. The same blocking script could probably be used "in reverse", creating a default "block all" rule and then adding the allowed countries above it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.