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

ebukz's avatar

Cannot access Homestead port outside VM ?

Please How can i make a port 9200 on Homestead accessible outside the Vm just like port 80 is accessible from my host machine and 443 and 22 are below

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN         
tcp6       0      0 127.0.0.1:9200          :::*                    LISTEN     
tcp6       0      0 ::1:9200                :::*                         LISTEN   

Currently a curl to 192.168.10.10:9200 returns connection refused but localhost:9200 returns the desired result. So I'm guessing its due to the bind address being 127.0.0.1

0 likes
4 replies
ebukz's avatar

Hi @willvincent @david_avz I have done that initially but the issue is that a curl to the VMs IP from within and outside the Vm gives a connection refused. Also here is my homestead.yaml

ports:
    - send: 9200
      to: 9200
      protocol: tcp

maurogusella's avatar

If you do everything on Homestead.yaml and your port is <=1024 you obtain a warning message during vagrant up. So start your VM with admin privileges (i.e. sudo vagrant up) and you save your day!

Please or to participate in this conversation.