Banning By IP Address

Hi guys,
I want to be able to ban users by IP address on my site if need be.
I know IPs can be changed etc but this will still help I think.

I have found a few plugins but one thing I don;t know is how I get the users IP address?