This one is a bit tough. It is publicly available information, is it not? But it's can also be used maliciously. So is it legal/ethical to store and/or gather information on users based on IP? It's mostly for curiosity, but it would also be important for marketing purposes, and maybe something to anonymously post on the homepage.
One use for this is detecting attacks and, for some products, limiting your release to one part of the world. I can see no real downsides from a business point of view, but I can also see how it would make users feel uncomfortable, and may actually be illegal.
Right now, I'm simply storing the user-agent and ip strings in a slightly randomized line-break format, so if a vulnerability is found by a web bot, there's less of a chance for ips to be properly scraped. But I'd like to eventually compile a map of users, and put a little dot where each user logged in. It would be a world-wide map, so the fine details would not be disclosed. But for some reason, I feel like I'm guilty of something or will get into trouble for collecting this data.
On the legal side of things, I've noticed articles similar to this: http://www.adexchanger.com/the-debate/why-ip-tracking-is-a-bad-idea/, and I've read about companies like Google and Facebook getting into hot water with users for collecting data.
I am in the United States, and the server will most likely operate somewhere in the US, but I have the impression that the per-country laws pertained to the client visiting.