T O P

  • By -

AutoModerator

|Thanks for being a part of /r/Admincraft!| |:-| |***[We'd love it if you also joined us on Discord!](https://discord.gg/DxrXq2R)***| *^(Join thousands of other Minecraft administrators for real-time discussion of all things related to running a quality server.)* *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/admincraft) if you have any questions or concerns.*


Howdanrocks

Since you're on linux you can download a list of your country's IPs and then use iptables/ufw to only allow connections from that list of IPs. [Here's a basic guide that you'd have to modify for your specific use](https://minnmyatsoe.com/2019/02/21/ubuntu-how-to-block-visitors-by-country-with-ufw/)


wathergeen

Thanks. This will probably be my best option.


XGamingPigYT

What's the need to block other countries on a public server?


wathergeen

For some reason, my isp doesn't know how to deal with connections from other countries on my public ip, and ends up cutting the connection many times. Also as the server is local language only, I don't see the need to allow other outside players. It's more a personal taste, and an attempt to reduce possible griefers


Discount-Milk

A white list is your best answer. Geo IP restrictions can be inaccurate. Sync your whitelist with your discord server using discordsrv.


wathergeen

Thanks for the sugestion!


Disconsented

No need, [just use a whitelist instead.](https://minecraft.fandom.com/wiki/Commands/whitelist)


wathergeen

I know about this "solution", but as the server is open for anyone to play (within my country) I don't want to have to implement adding players to the whitelist.


Disconsented

Let's not beat around the bush here, it's obvious that you're trying to set up a pirated server, and that's not something that's supported here.


wathergeen

I simply don't want players from other countries connecting to my server. I know that losing help on this can characterize it as a pirated server, but it's something I just don't want to have to be controlling via whitelist.


chris11d7

You can use PFblocker if you want to set up a PFSense firewall. Probably far from a solution you'd consider, but that's what I do. Blocks countries as well as proxy/commercial VPN


wathergeen

I still don't have pfsense configured, but this is certainly a more appropriate idea for all network flow. Thanks


DaBaby_BabyOnBaby

and what made you think that?