朱纯树博客
VPS测评推荐网站
cloudacead cloudacead

宝塔Linux面板屏蔽特定的User-Agent

首先科普下什么是User-Agent:User Agent中文名为用户代理,简称 UA,它是一个特殊字符串头,使得服务器能够识别客户使用的操作系统及版本、CPU 类型、浏览器及版本、浏览器渲染引擎、浏览器语言、浏览器插件等。

宝塔Linux面板屏蔽特定的User-Agent插图

因为最近发现了网络日志中有个User-Agent为OPPO的UA疯狂访问,IP还不一致,所以,就需要屏蔽特定的User-Agent!

宝塔Linux面板屏蔽特定的User-Agent插图1

其实宝塔Linux面板屏蔽特定的User-Agent很简单,进入Nginx防火墙,选择全局配置-User-Agent过滤-规则,即可设置!

宝塔Linux面板屏蔽特定的User-Agent插图2

进入规则后,编辑第一条规则!

| SF/前面加入规则| OPPO |即可!

宝塔Linux面板屏蔽特定的User-Agent插图3

宝塔Linux面板屏蔽特定的User-Agent插图4

这样设置就生效了,如果你使用的是Nginx防火墙老版本,设置更加简单!具体如下图:

宝塔Linux面板屏蔽特定的User-Agent插图5

赞(0) 打赏
未经允许不得转载:VPS测评推荐网站 - 朱纯树博客 » 宝塔Linux面板屏蔽特定的User-Agent

评论 24

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #30

    Nice blog here! Also your website loads up very fast!
    What host are you using? Can I get your affiliate link to your host?
    I wish my web site loaded up as quickly as yours lol

  2. #29

    Howdy are using Wordpress for your blog platform?
    I’m new to the blog world but I’m trying to get started and set up my own. Do you require
    any coding knowledge to make your own blog? Any help would be greatly
    appreciated!

  3. #28

    I just could not go away your site before suggesting that
    I really loved the usual info a person supply in your guests?
    Is gonna be again continuously in order to check
    up on new posts

    tinyurl.com1周前 (08-10)回复
  4. #27

    I think this is among the most vital info for me.
    And i’m glad reading your article. But wanna remark on some general things, The web site style is great, the articles is really nice :
    D. Good job, cheers

  5. #26

    It’s genuinely very difficult in this full of activity life to
    listen news on Television, so I only use world wide web
    for that purpose, and obtain the hottest information.

  6. #25

    Great blog! Is your theme custom made or did you download
    it from somewhere? A theme like yours with a few simple tweeks
    would really make my blog jump out. Please let me know where you got your theme.

    Thanks

    tinyurl.com2周前 (08-02)回复
  7. #24

    Hi to all, how is everything, I think every one is getting more from this web site, and your views are pleasant in support of new visitors.

    tinyurl.com3周前 (07-26)回复
  8. #23

    Quality articles or reviews is the key to be a focus for the people to go to see the
    site, that’s what this web page is providing.

    tinyurl.com3周前 (07-26)回复
  9. #22

    Very shortly this website will be famous among all blogging and site-building
    visitors, due to it’s nice posts

    http://tinyurl.com/2个月前 (06-14)回复