Caleb
Forum Replies Created
-
Blocking anyone hitting the login page (without getting in) will likely not be worth it. Many of these are either coming from Dynamically allocated IPs being short-term abused (think telekom and other standard ISPs), which tomorrow may carry legitimate visitors.
Many others are proxy or VPN IPs, which MAY also carry legitimate visitors.
Unless they are from dedicated “help the scammers” VPN companies like HMA (Hide-My-Ass), Proxy-51, iPredator, … In which case, block their whole IP ranges.
But it is rarely worth it to block one IP at a time.. If they are bad hosting or ranges, block the whole range.Moving blocking out of PHP and wordpress (move “left” from WordPress to Htaccess (Apache), or further left to software or hardware firewall tables), can speed up your web-site. Sometimes significantly. Testing each incoming IP against potentially over time thousands of IPs is expensive when done in slow software like PHP, or even worse loading up WordPress to do it. Not normally done in PHP. In WordFence, only for the convenience and ease of use, allowing “normal” users with no technical expertise to block bad guys.
But, in either case, you will want to consolidate your IPs as much as possible if your lists have grown long.
Here is how I look at it.
Yes, any hosting provider ALSO host legitimate “sites”. BUT… Those web-sites do not make a living crawling the web and causing trouble for others. And VERY, VERY few crawlers are legitimate in the sense that they pay you back with visitors.
So by blocking off a hosting provider’s IP range, you will rarely be blocking something worthwhile. None of OVH’s legitimate sites would ever try to visit you.. They also at times host SEO crawlers and scrapers like Ahrefs and others, who move their hosting from country to country. But those are also visitors that would NEVER pay you back for the bandwidth they steal. Unless you should be tricked into paying for their services. (My advice: DON’T. 🙂 )Even otherwise legitimate companies, like AWS (Amazon EC2) is being used specifically by YATS (Yet Another Twitter Scraper) and many other negative scrapers, where they run anonymously using fake Agent-strings. Because they do not think anyone would block AWS.. I block EVERY AWS range I see. In many years, nothing valid has every come OUT from there.
My rule is simple.. If you are running out of server hosting, and you are arriving with fake Agent-strings (pretending to be human), then you are DEAD to me. 🙂
As long as these accesses are accessing URLs on your site that should exist for your users, there is little you can do other than blocking their whole hosting ranges as they appear.
If on the other hand they access invalid URLs (are hunting for vulnerabilities) you can add those paths to your banned URLs on the options page to get them banned immediately once they try one. But that is a temporary, time-limited single-IP block.
Transients are just that. They expire and can be deleted.
You might wanna try the plugin WP-Optimize.
It has a function for cleaning up expired transients and other types of maintenance..The “arrive from strange sites” is merely the referrer field in the HTTP request. Which the bot can set to whatever they want and means nothing in these illegitimate cases. That could be the last place they bothered before you, or it could mean nothing.
Note that blocking using “hostname” can slow down your web-site. As it warns on the Advanced Blocking page. To translate from the IP address to the host-name require doing a reverse DNS IP lookup on all IPs to find their hostname, which will slow down ALL accesses. Not merely the illegitimate ones. Even your normal users will then have their IP reversed to a hostname, BEFORE they get in.
That IP block seems to be another OVH hosting range. OVH is one of the worst at having no control on what garbage hacker/spammer bots they host. OVH sending traffic from France, Canada, everywhere. They have been one of the worst in all the approx 10 years I have been watching them.
If you want to block them, block by clicking “Block this network” on one of the accesses, and permanently block off the whole network block instead of using host-name. Blocking by IP require no reverse lookups and is fast.
So you saddle a plugin with a one-star rating for it’s overall functionality, because YOU forgot to read the options and documentation? Wow. 🙂
BTW.. I just noticed in the image you posted, that the Add-On domains contain NON-Wordpress web-sites.
No.. WordFence cannot protect Non-WordPress sites. Even if it could, in your Cpanel structure, the traffic to the add-on domains is not even visible to the main web-site (in the root public_html). They are not related, despite the Add-On’s being contained “within” the physical public_html directory.
As I mentioned in the original response, that is a dumb Cpanel design “feature”.And with the others being non-WordPress, my suggestion about using a WordPress “Network” instead is obviously irrelevant.
The concept of Add-on domains is a Cpanel thing.. Not something WordPress or WordFence would know about. Despite Cpanel having the dumb notion of sticking the Add-On domains inside your public_html, WordPress does not know about them.
Your Add-on domains are separate installs (I assume that you installed separate copies of WordPress in them, and as such you would have to also have to install WordFence and any other plugins separately. They CANNOT see each other. Just like you also keep plugins updated separately on these multiple WordPress installs.The alternative would be to have setup your additional domains as “Aliases” in Cpanel (then pointing to the same root (public_html) as the original controlling domain). In that case, you could run the whole install by setting up a Multi-Site install of WordPress.
Your domains would still look like separate web-sites to the users, but you would be able to manage it all as ONE single WordPress installation. It it’s Network Admin section update plugins affecting all sites at once, INCLUDING WordFence.So, you forgot to check the option on the options page that states “Delete Wordfence tables and data on deactivation”? Yeah, that is unforgivable. You should have. 🙂
Can’t speak for Wordfence folks, but I would say that option is not set by default, because sometimes or most times a person actually WANT to be able to remove and reinstall a plugin, without losing all the existing configurations and history. So, tables are left behind for the reinstall or reactivation. Unless you ask the plugin to clean up after itself by setting that magic option. 🙂
Yupp.. Blackhat SEO spam.
But on that one.. As far as I know, that particular hack, infecting both WordPress and other type of sites, like Joomla, has a tendency to recreate itself. It leaves infected files that make the bad htaccess code magically reappear.
So, if I were you I would watch over the next days to verify that your htaccess stay the same. Maybe a full scan of the installation to make sure no “extra” or non-matching files are hiding in your installation.
@seoalien, if you go to your Google Search Dashboard for the site, look under “Crawl Errors”, where the 404 (do not exist) errors will show each bad link they have found.
When you click on a listed link, a window will pop up, where one of the tabs is “Linked From”. The “Linked from” will tell you which web-page GoogleBot found the goofy link on.
But as @wfalaa stated, apparently your site (likely a plugin or something from the hack) is generating these odd links. If you fix where the links are coming from, eventually GoogleBot will stop hunting them. (if they are still being generated.)
But that will of course not happen as long as you are generating them. 🙂
But looking at the source for the “Linked From” page on your site will tell.If the links are merely a side-effect of the hack, now fixed, then GoogleBot likely found them while the site was hacked and is now running through it’s queued up links. If your site has stopped generating them, eventually Google’s queue of pending visits will run out.
Personally, I would not start rate-limiting GoogleBot, if they innocently find bad (404 return) links my site was feeding them. Lest they decide to slow down their visits by seeing block screens. GoogleBot keep their own friendly, slow pace, which under normal circumstances depends on how many new, fresh links you feed them. Even the bad ones.
But… That’s just me.Assuming you are on a Shared hosting account.
Looking at the path (/usr/local/sbin/php/env.php), this is a file you have NO direct access to changing, and it is NOT accessible through your web-site paths. It was inserted by your hosting company, probably as a way to control various PHP environment stuff for them locally.Only way to know what they put in that file is to either ask your hosting company/support, or if you have command-line login access to your Linux server, simply go look at it manually.
Depending on what they put in it, disconnecting from it to “prepend” the WAF could either work just fine, or it could make your PHP start failing if they use it for something important.
So I would advise to first find out why the env.php file is there.
What hosting company is this?
user_nicename is merely a url sanitized version of user_login. In general, if you don’t use any special characters in your login, then your nicename will always be the same as login. (check your users table.. If you use normal login names, there is NO difference between the user_login and user_nicename columns).
But if you enter for example email address in the login field during registration, then you will see a difference.For instance, if your login is user@example.com then you will have userexample-com as the nicename and it will be used in author’s urls (like author’s archive, post permalink, etc). The only way to otherwise change the user_nicename”, is manual intervention in the database, or filtering.
(WordPress’ get_author_posts_url() function provides the filter “author_link” for changing the final, resulting URL to author pages before it is returned. (Of course filtering the link down to empty (href=””) would then effectively turn off author pages, as each author link would then point to the post page itself. 🙂
No where to go. 🙂If you by chance are confusing “Nice name” with the user accounts “Display publicly as” choice, or the Nickname, they are NOT related to ‘user_nicename’, which is an internal thing normal users have no direct control over..
The URL-path for author archives cannot change every time someone change “nick name” or “Display As” name. The URL is supposed to stay stable, or GoogleBot would go nuts trying to keep up with your changing URL addresses and apparently moving locations.
And BTW, that is one reason that the login-/user-name is the ONE thing you cannot change in your user account info. Once set, your login name stays the same. And is used permanently in the author URL. (the “/author/username” path).
So also for the “user_nicename”, which is set when the user is created, and is as mentioned just a sanitized (URL capable) version of the login name, just in case users use weird characters in logins or use email addresses.I am sure the Wordfence folks will correct me if I am wrong, and MAYBE they could word the option on the config screen a little more clear as to “Block” versus “Lock out”..
But, if I see it correctly, the “Immediately Block” option is NOT supposed to be a permanent block. It is a temporary Lock Out, where the IP immediately gets blocked for your specified time-period, say 5-10 minutes. Then the LockOut times out again, and that IP is unblocked. By that time, the brute-force is over/given up, or the IP will be locked out yet again when seen.
Effectively preventing brute force from that IP, because it will not reach the login screen again during that period, if it just once uses a “banned” username.If you look under WordFence -> Blocking, you should, I believe, see the temporary block there, where you have the option to click to make it permanent. But as I already mentioned, typically that is not necessarily a good idea. That same hacker will rarely come back using the same proxy/vpn IP. And if you don’t like that Proxy range, block the range. Not individual, single IPs.
I, for one, would certainly NOT want an automatic option to permanently ban all IP’s individually as they get abused.
Wow.. The expenditure of time your site would use, trying to match all incoming IPs against a block IP table with eventually 100,000s or even millions of individually blocked IPs in it.
Sites would over time slow to a crawl. I guarantee you, that such an option would not end well for any site.- This reply was modified 8 years, 9 months ago by Caleb.
An htaccess file in (or controlling) the /wp-admin directory will not affect standard logins, only access to scripts with a path within the /wp-admin directory.
It will not affect logins, because the /wp-login.php file is located in the root of your site. See it by logging out and trying to log in again. Watch the URL path.
If you really wanted to have two-level access control on all your logins, you could add htaccess permissions to load the wp-login.php file. Then first the web-server would ask you one login to access /wp-login.php (stopping the WP login hacker scripts at the door), and then afterwards the actual WordPress login would appear.. Quite painful. 🙂
@julesjules, most themes reveal the user name, because that is part of standard WordPress functionality picked up by all themes. The username is part of the default author archives link, and will typically show up in the Meta section of every post. (Around where you see the author name on screen). Unless that theme specifically have options to turn certain meta info off.
Mind you, that even plugins that “turn off author archives”, such as Yoast SEO and others typically do not actually remove author archives or even the links to author archives.
They simply add a redirect on the “all posts by this author” link, making it consistently redirect to for example the home-page. Which will make such things as Google stop calling on it. They then cannot index author archives and create “duplicate content”.
But it DOES NOT remove the actual link to “View all posts by this author” (domainname.com/author/username) from the HTML code or from being visible to users. Hence the username still appears. To remove that, you will have to “fix” the theme. Directly or indirectly.Try right-click on your post web-page, view source-code, then hit Ctrl-F to search for your user-name. You will typically see where the user-name appears in the HTML. Typically in the Meta information for the posting where they also show the posting date.
To remove that, one would have to either add a filter on wordpress functions like get_author_meta(), the_author(), and others. Removing or replacing the username.
OR one would have to run off a modified theme (using a child-theme). In the child theme one could replace certain template files with versions that do not spew out the bad parts of author info, such as the login name that is part of the author archive link..Mind you, that Google et all REQUIRE author name-info in the meta to accept being presented with a valid Schema for the page. Or their schema checker will complain about “missing author field”.
But one can replace that with only the Author name just fine. I for example have replaced author meta with only author name (no link behind it to click on, so no way to even TRY to click on to an author archive). But that is done in the theme programming behind it. By filtering away standard WordPress theme behavior.