Navjot Singh Navjot Singh - 1 year ago 115
Python Question

Finding my IP address on windows for SimpleHTTPServer

I've started an HTTP Server on my laptop using:

python -m SimpleHTTPServer

I want to access this from another computer in a different network. I tried finding the IP of the laptop running HTTP server using whatismyip and then called from the PC on other network like:


Because since 8000 is the default port on which it started. However, this doesn't seem to work. What is the right way?

Answer Source

First you need to know your public IP address.

This is how people find your network from outside. You can find this by Googling "whatsmyip".

For example your public ip address is

enter image description here

Then you need to know your private IP address, this is how people (or machines) find your PC from within your network.

Open a cmd and type in ipconfig

For example your private IP address is

This is mine

Now comes the hard part

You need to port forward people accessing the public ip to your private ip within the network.

It looks something like this:

enter image description here

Here is a comprehensive guide on how to do that

Most likely you need to go to your gateway ip, mine is if you see the above picture.

Login to the router and find a port forwarding section.

There you forward incoming requests to HTTP/TCP PORT 8000 to your private ip address port 8000, for example:

It would look something like this:

enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download