How do you protect your PBN sites from hackers?

givensia

Regular Member
Joined
Apr 11, 2014
Messages
396
Reaction score
122
It seems like there are so many different ways that hackers can get into your WordPress sites, inject spam ans malware, links etc. How are you guys protecting your PBN sites? Let's get a helpful thread going because we need to stop those ass holes
 
I think Wordfence is a great plugin for wordpress. Also the old super long super difficult password is a good way to keep yourself safe from brute force attacks.

I tend to keep a special username for the wordpress admin and i add a dedicated author for the posts. So at least the attackers will not easily find the admin username.
 
Use a limit login attempts plugin and also this little piece of code in the .htaccess file.

It re-direct's a request from the admin page to an error file if someone attempts to login from an IP that is NOT 123.456.789.111.

I'm still trying to figure out how to stop xmlrpc attacks.


# BEGIN WordPress
ErrorDocument 401 /error401.php
ErrorDocument 403 /error403.php


<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$
RewriteCond %{REMOTE_ADDR} !^123.456.789.111$
RewriteRule ^(.*)$ - [R=403,L]
</IfModule>
 
i don't use wordpress ;) ... make is safer but more work to set up and update
 
- Update frequently
- Use WordFence
- Avoid free themes
- Don't use default usernames
 
0. Scan your WP with WP-Scan and follow the instructions.
1. Change "/wp-login. php" to another link. Better link is "/abmgpskjg".
2. Delete readme and licence file.
3. Change username from admin to another.
4. Ban IPs for 10 failure login attempt.
5. Be careful with plugins, sliders, themes eg. that you install. In this case check exploit-db
6. Keep your WP up to date.
7. Check server settings (apache,nginx).
8. If you use VPS/dedicated server switch off FTP daemon and use sftp via sshd.
9. --||-- set permit root login to : "no". (This setting is in file /etc/ssh/sshd_config)
10. Check chmods and chowns. Set config files to 440, wp-content/uploads to 775.
 
Use a limit login attempts plugin and also this little piece of code in the .htaccess file.

It re-direct's a request from the admin page to an error file if someone attempts to login from an IP that is NOT 123.456.789.111.

I'm still trying to figure out how to stop xmlrpc attacks.


# BEGIN WordPress
ErrorDocument 401 /error401.php
ErrorDocument 403 /error403.php


<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$
RewriteCond %{REMOTE_ADDR} !^123.456.789.111$
RewriteRule ^(.*)$ - [R=403,L]
</IfModule>
Thanks for the code. I will use it on my sites.
 
Use a limit login attempts plugin and also this little piece of code in the .htaccess file.

It re-direct's a request from the admin page to an error file if someone attempts to login from an IP that is NOT 123.456.789.111.

I'm still trying to figure out how to stop xmlrpc attacks.


# BEGIN WordPress
ErrorDocument 401 /error401.php
ErrorDocument 403 /error403.php


<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$
RewriteCond %{REMOTE_ADDR} !^123.456.789.111$
RewriteRule ^(.*)$ - [R=403,L]
</IfModule>

I have a dynamic ip.

Only the last three nos are changed, how can i use that code?
 
0. Scan your WP with WP-Scan and follow the instructions.
1. Change "/wp-login. php" to another link. Better link is "/abmgpskjg".
2. Delete readme and licence file.
3. Change username from admin to another.
4. Ban IPs for 10 failure login attempt.
5. Be careful with plugins, sliders, themes eg. that you install. In this case check exploit-db
6. Keep your WP up to date.
7. Check server settings (apache,nginx).
8. If you use VPS/dedicated server switch off FTP daemon and use sftp via sshd.
9. --||-- set permit root login to : "no". (This setting is in file /etc/ssh/sshd_config)
10. Check chmods and chowns. Set config files to 440, wp-content/uploads to 775.
This is the best post I`ve seen in a while. Thank you but I was missing around 3 of the points :)
 
These answers are very informative and helpful! I also read here that blocking certain bots/crawlers can help prevent anyone discovering your PBN in the first place, despite most of the replies above cover the rest I think. Also, be careful with having the same plugin on multiple PBNs as that can leave quite a footprint.
 
It seems like there are so many different ways that hackers can get into your WordPress sites, inject spam ans malware, links etc. How are you guys protecting your PBN sites? Let's get a helpful thread going because we need to stop those ass holes

Yes use WordFence if nothing else, there is also bullet proof security plugin for WordPress but that's not recommended
for beginners, seriously don't use bullet proof security unless you really know how to get your self out of a jam with WordPress.
 
1. Dont used cracked themes
2. Install wordfence
3. Use cloudflare
 
Updating the WP, not using cracked themes and a good password do it for me.
 
Couple of questions,

How do you make it so it bans IPs after a certain amount of login attempts?
How do you change your "/wp-login" portion of the link to another one
 
Why in the world would someone hack a crappy looking PBN site?
 
Why in the world would someone hack a crappy looking PBN site?

It's not so much 'hack' as in a guy in a Matrix style guy, chain smoking in a dark room figuring out how to break your system but rather automated software probing for vulnerabilities, it's exceptionally common. If you run a VPS server at all, look in the server log files for a real eye opener, I get thousands of 'hacking' attempts every single day.

You get hacked because they can.
 
Last edited:
Back
Top