You don't need a module, everything is done using the web server and it's better and more reliable than a module.
https://www.ip2location.com/free/visitor-blocker
How to Block IP by Country: Restrict Access to Your Website from Specific Countries Using .htaccess...