Community

Is there any way to find IP address from anonymous comment?

Is there any way to find IP address from anonymous comment? I want to block a spammer.

Comments

Yes

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.

// Ayesh

Excellent, I am using views

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.

Thanks

It's not tue web host's name.

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.

// Ayesh

Thanks Ayesh. As I am very

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?

Thanks

Enter a path that you need to

Enter a path that you need to view this page on.
Ex: admin/content/comment/ip
Don't forget to restrict access (mid column in the Views UI) to users with "administer comments" or such permission.

// Ayesh

Thanks, Ayesh, that worked a

Thanks, Ayesh, that worked a treat. The new View works well.