How to get the real request IP in Tyk?


I am using Tyk dashboard, and I found that every time when we call the API in Tyk, it will log the request meta data in the Tyk dashboard (under the log browser section).

However, I notice that the value of the IP is different with the IP of the request. Currently, the IP show in log browser is 128.xx.xx.xx. But my machine real IP is 192.xx.xx.xx.

Is there any way to get the real request IP in Tyk? Any setting need to be done?


Maan Tarng


Tyk believes the information that it gets in the IP packet. If the packet comes directly from the client it will have a source address and tyk will use that in the analytics.

If there is an intermediate proxy, like a load balancer then the IP address that the packet comes from will appear to be the load balancer’s. In these situations Tyk will use the load balancer’s IP address in the analytics unless the load balancer records the original IP address in the X-Forwarded-For header. In this case Tyk will pick up that IP and use it in the analytics.

Most load balancers support adding the X-Forwarded-For header so it should be an easy thing to configure.


Thanks @Pete . I will look into it.