![]() |
Website hacking problem how to block admin access Okay i have a website sktthemes.net and it keeps on coming under fire from hackers in Turkey. Now how do i know? Quite simple my site is in wordpress and i have better wp security plugin installed. So it keeps on sending me emails about ip getting locked due to too many login attempts. IPs are: 78.160.130.138, 95.10.161.141 and so on many like 20 in a day. If you trace those IPs all come from Turkey. My question is very simple. I need to know how to block all admin access for IPs other than Indian IPs where we are so that such kind of hacking attempts don't happen. Sorry for such a long post/thread. |
Re: Website hacking problem how to block admin access you can try adding something like this to your .htaccess file Code: RewriteCond %{REMOTE_ADDR} !^93.89.95.250$If you have dynamic ip address you can do stuff like !^93.89.\d+.\d+ to allow certain ranges |
Re: Website hacking problem how to block admin access Awesome thanks for your valuable suggestion |
Re: Website hacking problem how to block admin access Rather than sending the miscreant to another place on your site, or anywhere else for that matter, I prefer sending them back to themselves. RewriteCond %{REMOTE_ADDR} !^93.89.95.250$ RewriteCond %{REQUEST_URI} .wp-login.php\.php* RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L] |
Re: Website hacking problem how to block admin access Here is the way to do it: Go to wp-login.php using FTP, add this line directly below <?php Code: if ($_GET['admincode']==128364){Code: }Code: require( dirname(__FILE__) . '/wp-load.php' );Code: <?phpCode: http://yourwebsite.com/wp-login.php?admincode=128364Hope it helps! |
Re: Website hacking problem how to block admin access Or, you could make the page only show up if your IP is detected: Code: $admin_ip = "123.456.789.123"; |
Re: Website hacking problem how to block admin access BAD ADVICE Quote:
I would give you 2 suggestions, my preference would be to use Wordfence plugin to guard against unwanted logins as it gives you the ability to better control login attempts, including giving you the ability to immediately lock out an IP after the first attempt to login with an invalid user name. In the alternative you could deselect having Better WP Security send notifications that it is doing its job and locking the bad guys out. I have done the same with Wordfence, I don't feel the need to be reminded that miscreants are trying unsuccessfully to log in to my sites. |
Re: Website hacking problem how to block admin access I can't believe that SQL injection is still something you have to worry about in 2013. PDO has been around for ages and everyone should use it. Why is this still a problem? - Some shared hosts don't have compiled PDO so script developers need to use mysql_* or mysqli instead - If you google "php mysql tutorial" this comes up: PHP MySQL Insert Into See the problem? Most people learns using PHP and mySQL based on this (sigh) Thank god the mysql_* library will be completely deprecated in 5.5, hopefully the madness will end |
Re: Website hacking problem how to block admin access This looks very interesting, definately worth to take a look to wp security part |
Re: Website hacking problem how to block admin access This looks very interesting, definately woth to take a look to the wp security part. Sorry duplicated post. |
| All times are GMT -6. The time now is 01:19 AM. |