Is there any way to find IP address from anonymous comment? I want to block a spammer.
If you create a View, you will see a field "Hostname" which is the hostname of the comment author. Note that certain configurations, like Cloudflare, Varnish, etc might have changed this value.
Excellent, I am using views so I will look into that. Just one question; I am not quite sure what you mean by 'hostname' is that an individual or a provider of web space like Lunarpages for example. I only want to block one person, not lots.
It's not the web host's name. It's always a valid IP address where the comment was posted from.
However note that blocking a single IP does not mean you block a single person. Many ISP's out there assign a shared IP to the users when they connect. Plus, don't forget Internet cafes and public wifi zones.
I usually block IP address if there are at least 10 bad comments from that IP.
Thanks Ayesh. As I am very new to views, I am not sure what to put where it says 'path'
This is what I have done so far:
1. Clicked 'add new view'
2. Given a view name
3. Selected 'comments' from the 'show' menu
4. Selected 'create page'
5. Given a page title
6. Then I come to 'path' and I am not sure what to do there, do you know?
Enter a path that you need to view this page on.
Don't forget to restrict access (mid column in the Views UI) to users with "administer comments" or such permission.
Thanks, Ayesh, that worked a treat. The new View works well.
Drupal is a registered trademark of Dries Buytaert.