How can I block countries from connecting

Hello

I don’t want some countries to log in to my Teamspeak server. How can I prevent them?

You need to setup your firewall to deny IPs from these countries.

Please use Google to find how to’s or matching IPs.

1 Like

I had the same problem, the firewall lists do not update themselves automatically. Therefore I found the software RdpGuard (Windows). This software blocks all attempted RDP attacks on the server (via IP) with temporary firewall entries. Additionally there is a cloud solution which contains a list of all currently blocked IPs of RdpGuard and a GeoIP (Country) solution which updates itself regularly. Unfortunately the software is not freeware but the best solution i found so far.

We have something that blocks countries, such as Iran, Iraq, etc places we know that won’t ever join us to play games yet people would use as a VPN to troll us. We also have another thing that auto gives certain countries like US/UK/CAN a tag so they can talk while places we aren’t sure will have to request voice.

Hello, I want to prevent some countries from accessing my server with the help of geoip. Access to port 22 is blocked without any problem. But they can still access the teamspeak servers. How can I prevent this. I’m sending you an example command. I will be glad if you edit and forward

iptables -A INPUT -m geoip -p udp --dport 9987 --src-cc US,DE -j DROP

iptables -A OUTPUT -m geoip --dst-cc DE -j DROP

I can block from all ports with this command. But we have a problem. I only need the command to allow 1 location. With this command I can block Countries one by one takes time to do. Do you just know what command to let germany?

I’ll try this

Do we only allow 9987 port with this command? It may take time to allow individual teamspeak ports. How can I make country access to all ports with a single command?

iptables v1.6.0: geoip: too many countries specified
Try `iptables -h’ or ‘iptables --help’ for more information.

Do you know about this error?

Thanks I solved the problem by dividing. I have 2 last questions

service iptables save
iptables: unrecognized service

I get this error while saving iptables

Another problem is I want to allow the ip address of my Music bots.

iptables -D INPUT -s ipadress -j REJECT

iptables -D INPUT -s ipaddres-j REJECT
iptables v1.6.0: host/network ipaddres' not found Try iptables -h’ or ‘iptables --help’ for more information.

iptables -D INPUT -s ipaddress -j REJECT
iptables: No chain/target/match by that name.

I am getting this error, do you know the solutions?

merged by moderator. Duplicate

Hello,

I don’t want my TeamSpeak server to be accessed from some countries. When I block country with iptables, Users cannot login but DDoS Attacks still come. Logically only when I grant access to the country I’m in. Shouldn’t DDoS attack stop? All other countries are disabled

Allowed Country : Turkey

What you blocked is that your machine does not reply to traffic from outside.
But it will still reach it even if it stays unanswered.

What you need is something like a machine blocking traffic before sending allowed traffic to your machine.

Not a TeamSpeak topic.

2 Likes