Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

trogne's avatar

homestead IP

In my homestead guest, my IP is "192.168.10.10".

But on my host, if I print the user IP, I see "192.168.10.1".

Why not 192.168.10.10 ?

"SERVER_ADDR" => "192.168.10.10" "REMOTE_ADDR" => "192.168.10.1"

Ok, it's "REMOTE_ADDR" that sends the request.

But where can I see "192.168.10.1" in my homestead VM ?

"ip addr" shows of course "192.168.10.10" (the server). But what about 192.168.10.1 ?

0 likes
2 replies
D9705996's avatar
D9705996
Best Answer
Level 51

192.168.10.1 is your local IP address of your PC/laptop. The 192.168.10.10 is the IP address of the homestead VM.

"SERVER_ADDR" => "192.168.10.10"  //homestead
"REMOTE_ADDR" => "192.168.10.1" //your computer

'REMOTE_ADDR' The IP address from which the user is viewing the current page. 'SERVER_ADDR' The IP address of the server under which the current script is executing.

http://php.net/manual/en/reserved.variables.server.php

trogne's avatar

I see ! Of course, if I query the server from my PC, I'm not homestead ! I'm me. And me = 192.168.10.1. Thanks !

1 like

Please or to participate in this conversation.