Advertisement

How to ban the particular IP address.

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
yinbit
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Jun 01, 2013 6:07 am

How to ban the particular IP address.

Post by yinbit » Tue Jul 07, 2015 2:29 am

I would like to prevent the particular IP address from accessing my jomsocial web site on Joomla, who often commented like a spam in my site.

Would you teach me how to investigate his IP address and ban his IP address on Jomsocial or Joomla?
I would like to investigate and ban his IP address on Joomla admin site.

And would you tell me the other site administrator in general takes measures against the person like a spammer on Joomla ?
Which extension is suitable for me?

Best regards

Advertisement
User avatar
ranwilli
Joomla! Master
Joomla! Master
Posts: 19203
Joined: Sun Feb 19, 2006 6:47 pm
Location: Toledo, OH
Contact:

Re: How to ban the particular IP address.

Post by ranwilli » Tue Jul 07, 2015 3:22 am

Have a look at Admin Tools Pro
Don't HACK the Joomla! core, Instead "Extend" and/or "Override."
Stay ON the update path.
https://harpervance.com

User avatar
xfsgpr
Joomla! Ace
Joomla! Ace
Posts: 1099
Joined: Mon Feb 14, 2011 4:02 am
Location: London

Re: How to ban the particular IP address.

Post by xfsgpr » Tue Jul 07, 2015 3:45 am

yinbit wrote:I would like to prevent the particular IP address from accessing my jomsocial web site on Joomla, who often commented like a spam in my site.
Put this in your .htaccess file to see if it works:

Code: Select all

# block visitors referred from indicated domains
RewriteEngine on
RewriteCond %{HTTP_REFERER} 192.168.1.100 [NC,OR]
RewriteCond %{HTTP_REFERER} 192.168.1.165 [NC]
RewriteRule .* - [F]
Of course, you need to replace 192.168.1.100 and 192.168.1.165 with the IP address you want to block.

yinbit
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Jun 01, 2013 6:07 am

Re: How to ban the particular IP address.

Post by yinbit » Tue Jul 07, 2015 7:12 am

Hi ranwilli

Thank you for your advice!
I'll try it.

Best regards

yinbit
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Jun 01, 2013 6:07 am

Re: How to ban the particular IP address.

Post by yinbit » Tue Jul 07, 2015 7:16 am

Hi xfsgpr,

Thank you for your suggestion!

But I would like to configure on Joomla backend site...

Thank you very much!

User avatar
mandville
Joomla! Master
Joomla! Master
Posts: 15161
Joined: Mon Mar 20, 2006 1:56 am
Location: The Girly Side of Joomla in Sussex

Re: How to ban the particular IP address.

Post by mandville » Tue Jul 07, 2015 8:41 am

blocking by IP is not very efficient, IPs keep changing. you are trying to prevent comment spam?, then have you installed captcha onto your site?
HU2HY- Poor questions = Poor answer
Un requested Help PM's will be reported, added to the foe list and possibly just deleted
portable mini golf https://www.puttersminigolf.co.uk/

User avatar
Bernard T
Joomla! Guru
Joomla! Guru
Posts: 782
Joined: Thu Jun 29, 2006 11:44 am
Location: Hrvatska
Contact:

Re: How to ban the particular IP address.

Post by Bernard T » Tue Jul 07, 2015 2:55 pm

As Mandville said, it's generally inadvisable to block comment spammers by IP.
Take into account that 99% of internet users (not speaking about servers here) are using dynamic IP's, which change with every re-connection to the internet. You will probably find that detail when you check and compare the IP's of the offending user.
In rare cases spam attacks are made by bots on dedicated servers with fixed IP, but most spammers are much more clever than that.

You didn't even mention in which extensions are the comments entered?
If Jomsocial - go and ask their support how to find out the IP, and do the comparison.

Antispam extensions: http://extensions.joomla.org/tags/spam-protection
VEL Team || Security Forum || PHP/Web Security Specialist || OWASP member
JAMSS author http://forum.joomla.org/viewtopic.php?f=621&t=777957
Twitter: @toplak

User avatar
ranwilli
Joomla! Master
Joomla! Master
Posts: 19203
Joined: Sun Feb 19, 2006 6:47 pm
Location: Toledo, OH
Contact:

Re: How to ban the particular IP address.

Post by ranwilli » Tue Jul 07, 2015 4:14 pm

Admin Tools (Pro) has a filter that identifies spammers by their reputations at Project Honeypot, it can be very useful.
Don't HACK the Joomla! core, Instead "Extend" and/or "Override."
Stay ON the update path.
https://harpervance.com

User avatar
Bernard T
Joomla! Guru
Joomla! Guru
Posts: 782
Joined: Thu Jun 29, 2006 11:44 am
Location: Hrvatska
Contact:

Re: How to ban the particular IP address.

Post by Bernard T » Tue Jul 07, 2015 5:24 pm

xfsgpr wrote: Put this in your .htaccess file to see if it works:

Code: Select all

# block visitors referred from indicated domains
RewriteEngine on
RewriteCond %{HTTP_REFERER} 192.168.1.100 [NC,OR]
RewriteCond %{HTTP_REFERER} 192.168.1.165 [NC]
RewriteRule .* - [F]
Of course, you need to replace 192.168.1.100 and 192.168.1.165 with the IP address you want to block.
If IP blocking is really necessary, I would advice against using mod_rewrite for simple access blocking.
A more effective, faster and less CPU intensive way, and officially the recommended way is by using simple Deny/Require directives :

Apache 2.2 :

Code: Select all

Order Allow,Deny
Allow from all
Deny from 192.168.1.100 192.168.1.165
Apache 2.4 :

Code: Select all

<RequireAll>
    Require all granted
    Require not ip 192.168.1.100 192.168.1.165
</RequireAll>

Edit: added Apache 2.4 syntax
VEL Team || Security Forum || PHP/Web Security Specialist || OWASP member
JAMSS author http://forum.joomla.org/viewtopic.php?f=621&t=777957
Twitter: @toplak

Advertisement

Locked

Return to “Administration Joomla! 3.x”