Skip to main content

Comments

6 comments

  • cPRex Jurassic Moderator
    Hey there! That IP2Location tool that you reference is a custom package addon for nginx, and isn't something that is included with cPanel by default. It also doesn't look like that tool specifically blocks the addresses, but provides a way to perform a reverse lookup of the IP address and associate it with a country for logging purposes. "This is an IP2Location IP Geolocation Nginx Module that enables the user to identify the country code and country name by IP address. In general, it is faster, easier and more accurate than reverse DNS lookups." If you wanted to block IPs based on country code I would recommend checking out the CSF firewall tool as that feature is built-in, compatible with cPanel, and free :D
    0
  • harmonypersechino5348
    Hey there! That IP2Location tool that you reference is a custom package addon for nginx, and isn't something that is included with cPanel by default. It also doesn't look like that tool specifically blocks the addresses, but provides a way to perform a reverse lookup of the IP address and associate it with a country for logging purposes. "This is an IP2Location IP Geolocation Nginx Module that enables the user to identify the country code and country name by IP address. In general, it is faster, easier and more accurate than reverse DNS lookups." If you wanted to block IPs based on country code I would recommend checking out the CSF firewall tool as that feature is built-in, compatible with cPanel, and free :D

    Thanks I had a quick look at CSF (already using it) and noticed it had the option to block countries but does it have the option to block all countries except X Y Z?
    0
  • cPRex Jurassic Moderator
    Yes :D You'll want to read up on the CC_ALLOW_FILTER rules for CSF as that lets you allow countries while still respecting other firewall rules you may have in place.
    0
  • harmonypersechino5348
    Yes :D You'll want to read up on the CC_ALLOW_FILTER rules for CSF as that lets you allow countries while still respecting other firewall rules you may have in place.

    Thanks got it set up. Do you know how the filter works in regards to where the GEOIP file is stored for CSF? And how I can make sure it's up to date as I noticed some countries that I have enabled are blocked using ping tools like Ping, mtr, dig and TCP port check from multiple locations and Ping Test - Simultaneously Ping From 10 Global Locations | KeyCDN Tools
    0
  • cPRex Jurassic Moderator
    That is something I don't know - you'd have to speak with CSF directly to see how they implement the country code blocking on their side as that is a third-party tool that isn't controlled by cPanel software. It's unlikely that any country code list will be 100% effective, as mentioned in the following forum post:
    0
  • harmonypersechino5348
    That is something I don't know - you'd have to speak with CSF directly to see how they implement the country code blocking on their side as that is a third-party tool that isn't controlled by cPanel software. It's unlikely that any country code list will be 100% effective, as mentioned in the following forum post:
    0

Please sign in to leave a comment.