This can be done by CSF but most of the IP in Geoipdatabase and those IP you can't block. If you want to enable particular IP that also can be done by CSF. Whta purpose you are going to do, so that i ll suggest best way.