Returning the Real IP Addresses of a Client to DCS (IP Pass-through)
When a client of a DCS Redis 4.0 or later instance connects to the server through a VPC endpoint, the source IP address displayed on the server belongs to the VPC endpoint (starting with 198.19), and it is not the real client IP address.
After the client IP pass-through function is enabled, the real IP address and port of a client can be returned when O&M personnel manage sessions or run commands such as Client List, Monitor, and Slowlog Get.
For Redis 3.0, run CLIENT LIST to view the real client IP address.
Notes and Constraints
- Currently, enabling client IP pass-through on the console is available only in CN Beijing1, CN Beijing4, CN Shanghai1, CN Shanghai2, CN Guangzhou, CN Shenzhen, CN Guiyang1, AP-Singapore, CN-Hong Kong, CN Ulanqab1, AP-Bangkok, and AF-Johannesburg regions. To enable this function in other regions, submit a ticket and contact customer service.
- SSL encryption and client IP pass-through cannot be enabled at the same time for instances.
- Client IP pass-through works only on new connections upon sending a Redis command. IP addresses of existing connections still start with 198.19.
Configuring Client IP Pass-through
- Log in to the DCS console.
- Click
in the upper left corner of the console and select the region where your instance is located.
- In the navigation pane, choose Cache Manager.
- On the Cache Manager page, click the name of the DCS instance for which you want to enable client IP pass-through.
- In the Connection area, click
next to Client IP Pass-through.
Figure 1 Configuring client IP pass-through - View the client IP address. (The following uses the Client List command as an example.)
In the record that contains "network=vpc", the value of addr is the client IP address.
Figure 2 Before enabling client IP pass-throughFigure 3 After enabling client IP pass-throughClient IP pass-through works only on new connections upon sending a Redis command. IP addresses of existing connections still start with 198.19.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot