| | #1 |
| SKT Wordpress Themes War Room Member Join Date: 2013 Location: Nagpur
Posts: 65
Thanks: 5
Thanked 28 Times in 11 Posts
|
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. |
| | |
| |
| | #2 |
| Active Warrior War Room Member Join Date: 2010
Posts: 45
Thanks: 0
Thanked 8 Times in 4 Posts
|
you can try adding something like this to your .htaccess file Code: RewriteCond %{REMOTE_ADDR} !^93.89.95.250$
RewriteCond %{REQUEST_URI} (wp-admin)
RewriteRule (.*) / [NC,QSA,L] If you have dynamic ip address you can do stuff like !^93.89.\d+.\d+ to allow certain ranges |
| |
| | #3 |
| SKT Wordpress Themes War Room Member Join Date: 2013 Location: Nagpur
Posts: 65
Thanks: 5
Thanked 28 Times in 11 Posts
|
Awesome thanks for your valuable suggestion
|
| | |
| |
| | #4 |
| ɹoıɹɹɐʍ ǝʌıʇɔɐɹǝdʎɥ War Room Member Join Date: 2008 Location: Texas
Posts: 2,138
Thanks: 243
Thanked 453 Times in 382 Posts
Blog Entries: 3 |
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] |
|
Robin | |
| |
| | #5 |
| Active Warrior War Room Member Join Date: 2013
Posts: 49
Thanks: 3
Thanked 6 Times in 6 Posts
|
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: <?php
if ($_GET['admincode']==128364)
{
/**
* WordPress User Page
*
* Handles authentication, registering, resetting passwords, forgot password,
* and other user handling.
*
* @package WordPress
*/
/** Make sure that the WordPress bootstrap has run before continuing. */
require( dirname(__FILE__) . '/wp-load.php' );
} Code: http://yourwebsite.com/wp-login.php?admincode=128364 Hope it helps! |
| |
| The Following User Says Thank You to Nett For This Useful Post: |
| | #6 |
| Active Warrior Join Date: 2008 Location: , , Australia.
Posts: 42
Thanks: 5
Thanked 4 Times in 4 Posts
|
Or, you could make the page only show up if your IP is detected: Code: $admin_ip = "123.456.789.123";
if ($_SERVER["REMOTE_ADDR"] != $admin_ip ) {
echo "get lost turkey head!";
exit;
} |
| |
| | #7 | |
| ɹoıɹɹɐʍ ǝʌıʇɔɐɹǝdʎɥ War Room Member Join Date: 2008 Location: Texas
Posts: 2,138
Thanks: 243
Thanked 453 Times in 382 Posts
Blog Entries: 3 | BAD ADVICE
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. | |
|
Robin | ||
| |
| | #8 |
| Active Warrior War Room Member Join Date: 2010
Posts: 45
Thanks: 0
Thanked 8 Times in 4 Posts
|
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 |
| |
| | #9 |
| Warrior Member Join Date: 2013
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
|
This looks very interesting, definately worth to take a look to wp security part
|
| |
| | #10 |
| Warrior Member Join Date: 2013
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
|
This looks very interesting, definately woth to take a look to the wp security part. Sorry duplicated post. |
| |
|
| Bookmarks |
| Tags |
| access, admin, block, block admin access, hacking, problem, website |
| |