Search code examples
pythonnetwork-programminglocalhostvirtualboxsimplehttpserver

Accessing python SimpleHTTPServer from outside Virtual Box


I'm running a python SimpleHTTPServer inside a virtual box. Is it possible to access it from the host machine? Running ipconfig in my host gave me the following address. I tried using this in the browser of my host but that doesn't seem to work. Should i be looking at a different IP address?

  $> ipconfig

    Windows IP Configuration


    Ethernet adapter Ethernet 2:

       Media State . . . . . . . . . . . : Media disconnected
       Connection-specific DNS Suffix  . :

    Ethernet adapter VirtualBox Host-Only Network #2:

       Connection-specific DNS Suffix  . :
       Link-local IPv6 Address . . . . . : xx:xx:xx:xxxx:xxx:xxxx
       IPv4 Address. . . . . . . . . . . : 192.168.99.1
       Subnet Mask . . . . . . . . . . . : 255.255.255.0
       Default Gateway . . . . . . . . . :

Solution

  • Port forwarding in virtual box helped solve the problem.