You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/06/10 02:57:38 UTC

[GitHub] [apisix] wannianma opened a new issue #4402: bug: ip-restriction blacklist is not work

wannianma opened a new issue #4402:
URL: https://github.com/apache/apisix/issues/4402


   ### Issue description
   
   i want try use the blacklist to block ip 172.16.20.142, but it's not work.
   
   my ip-restirction setting json below:
   
   ```
   {"id":"5","create_time":1614164130,"update_time":1623316842,"uris":["/api/test/*"],"name":"route_test","hosts":["test.tf.wnx.fun"],"vars":[],"plugins":{"ip-restriction":{"blacklist":["172.16.20.142"],"disable":false},"proxy-rewrite":{"regex_uri":["^/district/get(.*)","/get$1"],"scheme":"http"}},"upstream_id":"347373286092442083","status":1}
   ```
   
   access.log 
   ```
    - - [10/Jun/2021:17:22:17 +0800] "GET /api/test/index HTTP/1.1" 200 53 "-" "PostmanRuntime/7.28.0" "-" 0.121 0.065 "-" "-" "-" "-" "-" "-" - "http://internal.match.wyh.wonlap.cn"
    ```
   
   reposne body
   ```
   {
       "code": 200,
       "error": "",
       "data": {
           "tag": "A"
       }
   }
   ```
   
   ### Environment
   
   Bug report without environment information will be ignored or closed.
   
   * apisix version (cmd: `apisix version`):
   * OS:Linux T65 3.10.0-1062.el7.x86_64 #1 SMP Wed Aug 7 18:08:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):nginx version: openresty/1.19.3.1
   * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   * apisix-dashboard version, if have: 2.4
   * luarocks version, if the issue is about installation (cmd: `luarocks --version`):/usr/local/bin/luarocks 3.5.0
   
   ### What's the actual result? (including assertion message & call stack if applicable)
   
   ### What's the expected result?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] wannianma closed issue #4402: bug: ip-restriction blacklist is not work

Posted by GitBox <gi...@apache.org>.
wannianma closed issue #4402:
URL: https://github.com/apache/apisix/issues/4402


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tokers commented on issue #4402: bug: ip-restriction blacklist is not work

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #4402:
URL: https://github.com/apache/apisix/issues/4402#issuecomment-858483733


   @wannianma The access.log you pasted cannot prove where you sent this request, you may try to add $remote_addr to access.log and see the remote_addr value from APISIX's point of view.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] wannianma commented on issue #4402: bug: ip-restriction blacklist is not work

Posted by GitBox <gi...@apache.org>.
wannianma commented on issue #4402:
URL: https://github.com/apache/apisix/issues/4402#issuecomment-858490901


   I hava found the reason, i do not reset the plugins in the conf/config.ymal.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org