I'm using Django 3.0.5 under Kalilinux2020.1 launched from a virtual machine on VMWARE ESXI. I want to make my project public but it's not working.
I modified the settings.py and add: ALLOWED_HOSTS = ['*']
The django server is launched using pyhton3 manage.py runserver 0.0.0.0:8080
I allowed the port 8080 in the firewall using firewall-cmd --zone=public --add-port=8080/tcp
and I forwarded the port 8080 in the router
PS: I can access to my server from the other machines in the VMWare (LAN) but i can't get access from outside. Anyone has faced this problem?
The network adapter in your VM, it should be either Brigde or NAT either way it can't be accessible other hosts
I just find out the solution,
I changed the port to be forwarded from 8080 to 9001 and it works like charm now.
Thank you.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.