Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Obtain client IP in docker in azure container

Tags:

Is there anyone who can help me to obtain user client IP from docker container that runs on Azure container instance ?

My code gets only local IP of something , i guess it is revers proxy. So ip is 10.240.255.106; Is headers I also have host IP (Public container IP) but nothing more. Headers

{"Cache-Control":["max-age=0"],"Connection":["keep-alive"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,ru-RU;q=0.8,ru;q=0.7"],"Host":["23.99.249.54"],"User-Agent":["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"],"Upgrade-Insecure-Requests":["1"],"DNT":["1"]}

Is there a way to get real client IP?

like image 550
grinay Avatar asked Oct 26 '18 07:10

grinay


1 Answers

No, ACI doesn't preserve the client IP. You can create a feature request in the user voice. https://feedback.azure.com/forums/602224-azure-container-instances?filter=top&page=1

like image 128
Robbie Zhang Avatar answered Oct 11 '22 17:10

Robbie Zhang