Page 1 of 1

Spamm accesses from some IP-addresses

Posted: 13 Apr 2018, 10:19
by JanMolendijk
I saw this morning on my IP-tracker some strange things
I think it could be a way to try to hack...

Could you explain this a little Admin ???

Code: Select all

2018-04-13    06:25:49    185.208.164.104     /comments/user/4/Pics.php    id=%20AND%208220%3D8220&pg=22    no referer
...
& here another example

Code: Select all

2018-04-13    06:53:04    23.91.71.222     /comments/user/4/Pics.php    id=&pg=%28SELECT%20%28CASE%20WHEN%20%286742%3D6742%29%20THEN%206742%20ELSE%206742%2A%28SELECT%206742%20FROM%20INFORMATION_SCHEMA.PLUGINS%29%20END%29%29    no referer
...

Spamm accesses from some IP-addresses

Posted: 14 Apr 2018, 05:24
by Admin
Those accesses might be from bots that crawl your site. It can be for indexing the pages of your website (like a bot for search engine), or for hacking.
- If you want to block the access of some IPs, you can use this code in .htaccess file:

Code: Select all

Order Allow,Deny
Deny from 185.208.164.
Deny from 23.91.71.
Allow from all
- For more details, you can search on internet for: htaccess block ip.

Spamm accesses from some IP-addresses

Posted: 14 Apr 2018, 10:41
by JanMolendijk
Thanks for your explain, I had allready something to ban IP-Addresses
with a database + simple SQL-code I dropt in my web-pages...

Code: Select all

$ip = $_SERVER['REMOTE_ADDR'];

Code: Select all

$sql = "SELECT `ip_adress` FROM `ip_ban` WHERE ip_adress='$ip'  LIMIT 1 "; 
If a IP-Address is on the list I let them scip directly to Google.com
& I`m busy to setup a communication-form for IP-Addresses what I bant
so I could try to ask questions (if it is not a bot)

I going to do some study about htaccess block ip. But is my example also a option ???

Spamm accesses from some IP-addresses

Posted: 15 Apr 2018, 04:14
by Admin
I think it is more simple with .htaccess, but just use the method you see it works better for you.