• Hey Guest, we're evolving the future of TeaSpeak.
    You're invited to join the discussion here!

Server About geoip

heartles39

Fanatic member
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 teaspeak 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
 

WolverinDEV

TeaSpeak Team
Staff member
Administrator
Hey,
I don't actually know how IP - Tables work with GeoIP filtering.
But UDP and D(estination)-port seems fine.
 

heartles39

Fanatic member
Hey,
I don't actually know how IP - Tables work with GeoIP filtering.
But UDP and D(estination)-port seems fine.
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?
 

WolverinDEV

TeaSpeak Team
Staff member
Administrator
Well you could add a rule to block every incoming traffic and than add a country to the whitelist.
 

heartles39

Fanatic member
Well you could add a rule to block every incoming traffic and than add a country to the whitelist.
I solved the problem I will have a question. Could problems arise for Teaspeak if I block Germany? For example, I blocked Germany yesterday and my server crashes after 12 hours. No problem after Germany opened its blocks