Page 1 of 1

csf & geoip

Posted: 21 Oct 2019, 16:29
by sahar
Hello everyone,
I'm trying to configure csf so that only IPs from my country can access port 22.

I fill the 2 following configurations with the country code and port 22, like so:
CC_ALLOW_PORTS = "GB"
CC_ALLOW_PORTS_TCP = "22"

And removed port 22 from TCP_IN
But i'm still getting locked out after restarting CSF.
How can I know what's the reason for this? I saw that a service called geoIP is needed for this to function, do I need to do anything special to enable it?

Thanks for the help.

Re: csf & geoip

Posted: 22 Oct 2019, 01:30
by BallyBasic79
At first glance, it looks like the only port allowed for GB is 22. Be sure to include all ports allowed.

Re: csf & geoip

Posted: 23 Oct 2019, 18:23
by sahar
Sorry for late response.
I'm doing as documentation says, I need to add country and allowed ports to CC_ALLOW_PORTS / CC_ALLOW_PORTS_TCP and remove port 22 from TCP_IN

And anyway I'm testing on port 22 so even if I need to add other ports it doesn't matter, it should work.