I have a Windows laptop running a web server on some port - say localhost:8000. I can access the website from the Windows laptop fine. I have a MacBook which wants to access the website being hosted on the Windows laptop. I can connect them via an Ethernet cable.

Here's what I tried:

  • Started running a dummy HTTP server on Windows laptop using python -m http.server
  • Connected MacBook and Windows laptop with Ethernet cable
  • Ran ipconfig on Windows and recovered the IPv4 address under the heading Ethernet adapter Ethernet:
  • Tried connecting to <Windows IPv4>:8000 from my web browser on macOS, but failed to do so (it just never connects so I'm guessing it timed out).

Any help on on how to resolve this would be much appreciated!


  • From an admin elevated command prompt on the Windows machine run netsh advfirewall set allprofiles state off and then test from the Mac if the http://<IPAddress>:8000 is accessible. If it is accessible you will want to run from the same admin elevated command prompt: netsh advfirewall set allprofiles state on and then netsh advfirewall firewall add rule localport=8000 dir=in name="Inbound TCP Port 8000" protocol=TCP enable=yes action=allow profile=private,domain,public .... now try and confirm it you can connect. If so let me know and I'll explain in more detail with an answer. – Pimp Juice IT Jul 18 '18 at 2:46
  • Hi, unfortunately I cannot connect after disabling the firewall – Carpetfizz Jul 18 '18 at 15:45
  • After pinging the Windows IPv4 address, I get several of the following Request timeout for icmp_seq 0 – Carpetfizz Jul 18 '18 at 15:46
  • Just as a peanut gallery comment but is there a particular reason that you aren't using e.g. a router or similar? Obviously it's possible to do this (direct connection via Ethernet) but it feels like introducing an extra point of failure. Also, while I could definitely be mistaken, my understanding is that for many "direct" connections (no hub, etc.), you often need a cross-over Ethernet cable vs a standard patch cord. – Anaksunaman Jul 19 '18 at 8:49
  • How can I do this with a router? – Carpetfizz Jul 19 '18 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.