Python SimpleHTTPServer: Cannot connect from any machine on the LAN

5,648

Check if your system and switch firewall is allowing port 80. Here is what you should do to figure it out from a remote machine in your network:

$ traceroute <IP_on_which_python_server_is_running>

Also try:

$ telnet <IP_on_which_python_server_is_running> 80

This will help you to figure out if the port is accessible or not.

Share:
5,648

Related videos on Youtube

Steven Lu
Author by

Steven Lu

Play a multitouch HTML5 Tetris clone -- don't worry, keyboard will also work great: http://htmltetris.com A huge fan of tmux, and I use Sublime Text and (more often) the indomitable Vim. I have some special experience with: JavaScript &amp; CSS &amp; HTML5 Application design and architecture OpenGL &amp; WebGL CUDA Animation, simulation, etc. Application security Databases: MySQL, Oracle, SQLite C++, template metaprogramming, applied C++ metaprogramming, Clang &amp; LLVM

Updated on September 18, 2022

Comments

  • Steven Lu
    Steven Lu almost 2 years

    I'm trying to view a website I am building on my Mac on an iPad that is connected on the same LAN on the same Wireless AP.

    I've got the right IP address, I can load up the page just fine on the same machine (http://localhost)

    and this is how I started the server sudo python -m SimpleHTTPServer 80

    What are the steps I can take to figure out why connections from other machines on my network don't work?

    • Kev1n91
      Kev1n91 about 7 years
      Have you figured out what the exact problem was ? I am facing the same problem at the moment and found this very old question
    • Steven Lu
      Steven Lu about 7 years
      The question is too old and not specific for me to remember what I was doing so I do not remember what the resolution was. But it sounds like if you have a third unix computer you can use traceroute etc. like the answer says.
  • Steven Lu
    Steven Lu over 11 years
    Ah, yes, traceroute and telnet. good tools that I have used before but forgot about yesterday.
  • Aditya Patawari
    Aditya Patawari over 11 years
    Could you please upvote this if it helped you. :)