how to link ipaddress to a name to allow connections when on the same router

48 Views Asked by At

So I making a small website with django, and I want my colleagues to be able to connect. We all will be using the same router, and although I can ask them to connect via the address I provide http://192.168.100.xxx on port 8000. I decided to make it easier by mapping the address to a name, so they can connect via http://my_server:8000. Although I am unsure on how to come about this. Whether to do it from the router settings, or my system settings.

I've tried searching online on on how to do such, and most articles are come accross are very confusing. I would like someone to give a straightforwards approach to this.

2

There are 2 best solutions below

2
yxz On

If you only want a couple of your friends to connect, you can a edit the hosts.txt file on each of their computers to add a line like this

192.168.100.xxx        my_server

note, however, editing the hosts.txt file is kinda dangerous and not a scalable solution

0
luko On

I've been able to resolve the issue, after noticing that my browser still took a while to try to connect before failing. I decided to check my firewall, turns out I just needed to enable the firewalls for python and python.exe