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 2022/05/06 09:06:42 UTC

[GitHub] [apisix] helloxubo opened a new issue, #6992: help request: The apisix log client IP is not a real IP.

helloxubo opened a new issue, #6992:
URL: https://github.com/apache/apisix/issues/6992

   ### Description
   
    The apisix log client IP($remote_addr) is not real client ip, How to obtain the client real ip?
   
   ### Environment
   
   - APISIX version (run `apisix version`):
   - Operating system (run `uname -a`):
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

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


[GitHub] [apisix] helloxubo commented on issue #6992: help request: The apisix log client IP is not a real IP.

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

   
   
   
   > @helloxubo Could you describe your use case elaborately? In which case you didn't see the real client IP?
   
   Hello,I use the helm chart deploy the environment. apisxi is in the k8s. $remote_addr is the birdge ip ,not real client ip.
   ![QQ图片20220506175009](https://user-images.githubusercontent.com/38270190/167109787-4cae6591-0bb6-4281-a9bc-ba71209c5595.png)
   ![QQ图片20220506175055](https://user-images.githubusercontent.com/38270190/167109827-90d0d226-f825-4ffe-8c9e-10a16a2ab95e.png)
   
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] helloxubo commented on issue #6992: help request: The apisix log client IP is not a real IP.

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

   Sorry, let's be clear. I want to get the IP of the browser. Is there any way?
   @kwanhur @tokers 


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] kwanhur commented on issue #6992: help request: The apisix log client IP is not a real IP.

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

   From the above, you mean the real client IP should be the address  of `eth0`? @helloxubo 
   
   Emm, maybe should make clearly which route path to APISIX.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] kwanhur commented on issue #6992: help request: The apisix log client IP is not a real IP.

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

   You can place the IP of browser on extensible header like `x-forwarded-for` before reaching APISIX, and log it on APISIX with modified `access_log_format`.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] tokers commented on issue #6992: help request: The apisix log client IP is not a real IP.

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

   @helloxubo Could you describe your use case elaborately? In which case you didn't see the real client IP?


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] helloxubo closed issue #6992: help request: The apisix log client IP is not a real IP.

Posted by GitBox <gi...@apache.org>.
helloxubo closed issue #6992: help request: The apisix log client IP is not a real IP.
URL: https://github.com/apache/apisix/issues/6992


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] tzssangglass commented on issue #6992: help request: The apisix log client IP is not a real IP.

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

   I think you can take a look at this to see how to get the real ip: https://github.com/apache/apisix/discussions/4793. if you want to get the real ip in APISIX, the prerequisite is to at least have briage carry the real ip in some header.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] tokers commented on issue #6992: help request: The apisix log client IP is not a real IP.

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

   The behavior for seeing the real IP from the client depends on how does your LB (before APISIX) work. It should carry some related information (e.g. `X-Real-IP` and `X-Forwarded-For`) to the backend.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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