csf & geoip

Post Reply
sahar
Junior Member
Posts: 3
Joined: 16 Aug 2015, 16:03

csf & geoip

Post 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.
BallyBasic79
Junior Member
Posts: 80
Joined: 22 Aug 2019, 21:43

Re: csf & geoip

Post by BallyBasic79 »

At first glance, it looks like the only port allowed for GB is 22. Be sure to include all ports allowed.
sahar
Junior Member
Posts: 3
Joined: 16 Aug 2015, 16:03

Re: csf & geoip

Post 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.
Post Reply