What are good reasons to store registration and verification IPs
When a user creates an account, I email them a link to verify their account. Are there good reasons to store either or both of t开发者_运维知识库he IP used in registration and IP used in confirmation? I've seen some developers do that, but it's not clear to me what purpose this serves? and if it's worth doing at all. If I do store this data, what can I use it for later.
note: I generally will store the last IP from which the user logged in, but wondering about registration and verification IPs.
Because it's easy to store and impossible to build that data later, should a need for it arise.
As far as potential uses for IPs used in various requests/actions, it really depends on what you're doing. A few categories you might use them in are…
- Preventing unauthorized access — e.g. keeping bots from registering lots of accounts or analyzing traffic to ensure a user account isn't being used in a suspicious way
- Legal compliance — A subpoena may request the IP address that created a user, not just the last-used one
- Tracking a user — Especially in the case of networks that track hits across multiple services/platforms.
Also good for spam threats. If you plan to do any kind of email marketing via your own code and one of the recipients makes a spam complaint: Spamhaus, Godaddy, et al. will ask you for the user's opt-in date/time and IP. This will help keep you from being blacklisted
精彩评论