Ting Wang
Ting Wang

Reputation: 231

Access local website from another computer in the same network

I recently wrote a web using Flask, and made the host='0.0.0.0', port=5000.

I can access the web with 127.0.0.1:5000 or localhost:5000 or 192.168.1.12:5000(my IP), but I can only do this with the computer that runs the codes.

How can I access the website from another PC in the same LAN? I have tried all the method I can find online. But none of them worked.

I'm running the code on windows 10. Please help!

Upvotes: 0

Views: 2750

Answers (2)

Mikhail Efimov
Mikhail Efimov

Reputation: 343

Maybe Windows Defender Firewall or antivirus is blocking connection from outside. Try disabling it (or, better configure it to allow connections only to your service).

Upvotes: 1

Jakob
Jakob

Reputation: 1925

To access the website from another PC only works with your IPv4 adress. So only 192.168.1.12:5000 would work. But it looks like the port 5000 is blocked. Maybe it's blocked by a virus protection. Try a port like 80 or 8080.

Upvotes: 1

Related Questions