I know cloudlfare and other cloud providers often provide geoblocking features if you host with them.

Does anybody know of any similar foss packages for us self-hosters?

I know I don’t have any need for somebody outside of my country to access my server, so geoblocking IPs would be a great security feature.