Home > database >  localhost:8000 not accessible using physical IP
localhost:8000 not accessible using physical IP

Time:12-07

I'm trying to access my server on localhost:8000 from my LAN network using my physical IP address: 192.168.1.5:8000 but it's saying 192.168.1.5 refused to connect.

The django server has already

ALLOWED_HOSTS = ['*']

And the IP is correct (got it from ipconfig) My network is set on Private on both computers by the way I can't access that from my own computer too. I'm not using a VPN

The firewalls are all disabled. I even allowed the port 8000 using the rule in Inbound rules. I tried this but didn't work

netsh advfirewall firewall add rule name="TCP Port 8000" dir=in localport=8000 protocol=TCP action=allow

I'm out of ideas, I'm confused. I used to do it before, I'm not a begginer.

CodePudding user response:

Run below command to start your django server on IP.

python manage.py runserver 192.168.1.5:8000
  • Related