Title: Blocking Linux
Last modified: February 27, 2020

---

# Blocking Linux

 *  Resolved [mark8888](https://wordpress.org/support/users/mark8888/)
 * (@mark8888)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-linux/)
 * Hi,
 * Getting lots of bot traffic with Linux (at least that’s what i see in Google 
   Analytics),
 * Can i just place user – agent Linux and it will block all User agents that have
   Linux in it?
 * Thank you
    Mark
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fblocking-linux%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/blocking-linux/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/blocking-linux/page/2/?output_format=md)

 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-linux/#post-12488869)
 * Hi Mark,
 * >  Can i just place user – agent Linux and it will block all User agents that
   > have Linux in it?
 * You should be able to use **Enter User Agents:** field to enter your bot located
   in **Blacklist Manager** tab in admin settings.
 * Let me know if it works for you.
 * Thank you
    -  This reply was modified 6 years, 2 months ago by [mbrsolution](https://wordpress.org/support/users/mbrsolution/).
 *  Thread Starter [mark8888](https://wordpress.org/support/users/mark8888/)
 * (@mark8888)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-linux/#post-12490357)
 * Sorry, didn’t understand.
 * what i meant is if i need to place for example “Linux x86_64” or i can just place“
   Linux” to block all user agents that have Linux in the name.
 *  Thread Starter [mark8888](https://wordpress.org/support/users/mark8888/)
 * (@mark8888)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-linux/#post-12493377)
 * I placed both options so now when i check httaccess it looks like here below 
   but a day after – still plenty of Linux bots. Can you suggest what to do?
 * <IfModule mod_rewrite.c>
    RewriteEngine On
 * RewriteCond %{HTTP_USER_AGENT} ^Linux [NC,OR]
    RewriteCond %{HTTP_USER_AGENT}
   ^Linux\sx86_64 [NC] RewriteRule ^(.*)$ – [F,L]
 * </IfModule>
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-linux/#post-12495104)
 * Hi,
 * Have you also enabled the following feature **Block Fake Googlebots** under **
   Firewall -> Interbots**?
 * Thank you
    -  This reply was modified 6 years, 2 months ago by [mbrsolution](https://wordpress.org/support/users/mbrsolution/).
 *  Thread Starter [mark8888](https://wordpress.org/support/users/mark8888/)
 * (@mark8888)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-linux/#post-12495415)
 * added now.
 * Now it should work?
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-linux/#post-12496794)
 * Hi, let me know if it works or not.
 * Thank you
 *  Thread Starter [mark8888](https://wordpress.org/support/users/mark8888/)
 * (@mark8888)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-linux/#post-12500258)
 * Hi,
 * No, it doesnt work.
 * i see this code in httaccess, i marked to block fake google bots – i see exactly
   the same bots with Linux UA coming without being blocked. Can you please advise
   how to fix it?
 * This is the httaccess code i see:
    <IfModule mod_rewrite.c> RewriteEngine On
 * RewriteCond %{HTTP_USER_AGENT} ^Linux\sx86_64 [NC]
    RewriteRule ^(.*)$ – [F,L]
 * </IfModule>
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-linux/#post-12500665)
 * Hi,
 * Do you have any of the following features enabled? If you don’t can you enable
   the feature that best suits your needs.
 * **Completely Block Access To XMLRPC:
    Disable Pingback Functionality From XMLRPC:
 * The above features are located in **WP Security -> Firewall -> Basic Firewall
   Rules -> WordPress XMLRPC & Pingback Vulnerability Protection**.
 * Regards
 *  Thread Starter [mark8888](https://wordpress.org/support/users/mark8888/)
 * (@mark8888)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-linux/#post-12506711)
 * Hi,
 * it was enabled. But still the block doesn’t work.
 *  Thread Starter [mark8888](https://wordpress.org/support/users/mark8888/)
 * (@mark8888)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-linux/#post-12510436)
 * I think the problem is in the way your plugin translates “Linux x86_64” which
   i placed into this part of the code: ^Linux\sx86_64
    something there not correct.
   I tried with different plugin and this part was different. like this: Linuxx86_64
 * can you please suggest a solution.
 * Even better, is it possible to block by using exact match with multiple parameters
   together – i mean in a same way as doing google search for exact sentence.
 * Like blocking “X11; Linux x86_64”
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-linux/#post-12513618)
 * Hi, I have submitted a message to the developers to investigate further your 
   issue.
 * Thank you
 *  Plugin Contributor [wpsolutions](https://wordpress.org/support/users/wpsolutions/)
 * (@wpsolutions)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-linux/#post-12514120)
 * Hi [@mark8888](https://wordpress.org/support/users/mark8888/)
    Do all of these
   bots have a user agent string which **starts** with the word “Linux”? Could it
   be that the user agent strings which contains “Linux” all start with something
   different? Are you able to check what the exact user agent string is?
 * I tried a few tests on my site by simply entering “Linux” in the blacklist “user
   agents” section and I was able to block requests which had a user agent such 
   as this one:
    Linux x86_64
 *  Thread Starter [mark8888](https://wordpress.org/support/users/mark8888/)
 * (@mark8888)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-linux/#post-12514999)
 * Hi,
 * I think if you place just Linux it does work. But by doing so you are blocking
   all Android users. I think the problem is with how Linux x86_64 entered into 
   the code – maybe the space there messes things up.
 * The full string is usually: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36(
   KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
 *  Plugin Contributor [wpsolutions](https://wordpress.org/support/users/wpsolutions/)
 * (@wpsolutions)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-linux/#post-12515953)
 * > I think the problem is with how Linux x86_64 entered into the code – maybe 
   > the space there messes things up
 * Actually the space should not affect the correct operation of the blocking rules.
   
   For example, I also tried entering the following in the settings: Linux x86_64
 * The above appears as follows in my .htacces file:
    RewriteCond %{HTTP_USER_AGENT}
   ^Linux\sx86_64 [NC]
 * The blocking still works as expected except this time blocking only occurs for
   visitors with user agent string which **exactly** matches “linux x86_64” (note:
   it is case insensitive).
 * Have you asked your host support people to see if they can help?
    Have you also
   checked to see if some other .htaccess directives in your file might be conflicting
   with these rules?
 *  Thread Starter [mark8888](https://wordpress.org/support/users/mark8888/)
 * (@mark8888)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-linux/#post-12515960)
 * Yes, i have the same code in httaccess.
 * Please explain what you mean exact match. For example – this bot should be blocked“
   Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/
   69.0.3497.100 Safari/537.36” – but it’s not.

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/blocking-linux/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/blocking-linux/page/2/?output_format=md)

The topic ‘Blocking Linux’ is closed to new replies.

 * ![](https://ps.w.org/all-in-one-wp-security-and-firewall/assets/icon-256x256.
   png?rev=2798307)
 * [All-In-One Security (AIOS) – Security and Firewall](https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/reviews/)

 * 16 replies
 * 3 participants
 * Last reply from: [mark8888](https://wordpress.org/support/users/mark8888/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-linux/page/2/#post-12520809)
 * Status: resolved