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

Comments

ayesh’s picture

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.

tesol’s picture

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

ayesh’s picture

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.

tesol’s picture

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

ayesh’s picture

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.

tesol’s picture

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

NewAccount-1’s picture

I don't know there is a way to find an IP address from anonymous comment.
But,if you know the IP address you can find the details like ISP(Internet Service Provider),IP location,country,latitude,longitude etc..using IP-Details.com .

ggevalt’s picture

You can activate the syslog module in core and then when you have a spam comment, look at 'details' of the log activity which should have the IP address. As others have advised, the spammer might be coming from an Internet cafe, or a school, or a business IP address that you don't want to block, but if you are getting a fair amount of it, you can go ahead and block that IP address in User management under Access Rules.

Also, do you use Mollom? That is free and works extremely well. As it was invented by Dries Buytart of Drupal fame, it comes with some credibility. We use it extensively with great luck.

g

tesol’s picture

Views worked for me.

modemtips’s picture

Thank you for your comment and additional information about IP addresses. It's important to be cautious when dealing with spam comments and finding effective ways to address them. Activating the syslog module in core and checking the log activity for details such as IP addresses is indeed a helpful approach.

Regarding your mention of Mollom, it is a content moderation service that was created by Dries Buytaert, the founder of Drupal. Mollom helps prevent spam and other unwanted content on websites, and many users have found it to be effective.

As for your suggestion to explore more about IP addresses on the website https://modemtips.com/, I'm unable to browse the internet or provide real-time updates. However, there are various online resources available where you can learn more about IP addresses and their significance in website management and security.

If you have any more questions or need further assistance, feel free to ask!