Use ip to block site visitors?

I have just been giving a question from a client.
Is it possible to block an entire town/city/state from viewing a website.
I am assuming that this is something that could be done with the ip address?
Can anyone clarify
Thanks