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/12/08 19:30:41 UTC

[GitHub] [apisix] ynsdl opened a new issue, #8488: help request: real-ip plugin enable problem

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

   ### Description
   
   I am trying to enable real-ip plugin to override remote_addr with http_x_forwarded_for to get real client ip.
   
   When ı add to my json from apisix dashboard, it returns to me "invalid plugin data".
   
   ![Screen Shot 2022-12-08 at 22 06 33](https://user-images.githubusercontent.com/46422366/206549554-0bd22495-0a23-498f-8875-b5c438204a45.png)
   
   
   ### Environment
   
   - APISIX version (run `apisix version`): 3.0.0
   - Operating system (run `uname -a`): Linux apisix01 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
   - 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: 2.13.0
   - 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] ronething commented on issue #8488: help request: real-ip plugin enable problem

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

   > same error.
   > 
   > <img alt="Screen Shot 2022-12-09 at 09 53 59" width="1011" src="https://user-images.githubusercontent.com/46422366/206643239-278b829f-7bea-4aef-8bde-f062b50d7eb1.png">
   
   i mean the raw data is
   
   <img width="406" alt="image" src="https://user-images.githubusercontent.com/28869910/206658127-a79add2c-0e88-460c-bed4-4c2ac9c5c9bc.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] tzssangglass commented on issue #8488: help request: real-ip plugin enable problem

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

   > I cant see http_X_forwarded_for ip addr (8.6.2.2) at Jboss. it writes 10.4.2.16 on jboss log.
   
   can you get `x-real-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] ronething commented on issue #8488: help request: real-ip plugin enable problem

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

   you may use
   
   ```json
   {
     "source": "arg_realip",
     "trusted_addresses": ["127.0.0.0/24"]
   }
   ```


-- 
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] ynsdl closed issue #8488: help request: real-ip plugin enable problem

Posted by GitBox <gi...@apache.org>.
ynsdl closed issue #8488: help request: real-ip plugin enable problem
URL: https://github.com/apache/apisix/issues/8488


-- 
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] ynsdl commented on issue #8488: help request: real-ip plugin enable problem

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

   solved
   thanks


-- 
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] ynsdl commented on issue #8488: help request: real-ip plugin enable problem

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

   same error. 
   
   <img width="1011" alt="Screen Shot 2022-12-09 at 09 53 59" src="https://user-images.githubusercontent.com/46422366/206643239-278b829f-7bea-4aef-8bde-f062b50d7eb1.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] ynsdl commented on issue #8488: help request: real-ip plugin enable problem

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

   OK. I added source not only "http_x_forwarded_for" but also "arg_realip" but I can see client ip on my application server
   
   my structure is internet --> nginx ---> apisix ---> jboss
   
   I can see client ip on nginx;
   
   x.x.com | **remoteAddr::8.6.2.2** | upstreamAddr::10.3.1.1:9080 | [09/Dec/2022:12:26:11 +0000] | request:POST  HTTP/2.0 | httpStatus::200 | bytesSent::0| apiKey::- | reqTime::0.001 | upsRespTime::0.001 | upsConnTime::0.000 | upsHeaderTime::0.001
   
   apisix log;  nginx remote addr come apisix with http_x_forwarded_for
   
   x.x.com | **xForweededFor::8.6.2.2** | remoteAddr::10.4.2.16 | upstreamAddr::10.34.167.39:8080 | [09/Dec/2022:12:26:12 +0000] | request:POST  HTTP/1.1 | httpStatus::200 | bytesSent::0 | userAgent::okhttp/4.9.0 | appKey::| apiKey::| reqTime::0.001 | upsRespTime::0.000 | upsConnTime::0.000 | upsHeaderTime::0.000
   
    I cant see http_X_forwarded_for ip addr (8.6.2.2) at Jboss. it writes 10.4.2.16 on jboss log.
   
    


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