I am trying to open a specific port (8000) on my Mac (macOS 11.6) for local web development testing.

Let’s say my computer’s NAT IP is If I go to, I get nothing. nmap also tells me the port is closed. I can access the port on, though.

I’m not doing anything with my router to give WLAN access, this is just so other computers and mobile devices on my local Wi-Fi network can access the server.

I have turned off the application firewall, and also have tried adjusting the packet filter (PF) settings, and it kept saying that there was a syntax error in the PF list.

I even tried disabling pfctl, which I did, but macOS is still blocking port 8000 and generally still seemed to be running a firewall. Is there another/different firewall system? What’s the best way to open a port these days?

  • 2
    Your Diango instance seems to be bound to localhost ( only. What is the output of netstat -f inet -n | grep 8000? You may want to try specifying port and IP address when starting Django: python manage.py runserver ( means "bind to all IP addresses").
    – jaume
    Commented Feb 14, 2022 at 14:41

1 Answer 1


You have to configure your application to open the port and wait on specific network subnet.

What you have in the moment, is serving only on and not on 192.* or wider.

In django, you can run it with this example:

python manage.py runserver

Similar question answered on stackoverflow.

  • The linked answer recommends to open on, which makes the port accessibly both locally and from the LAN without the need to know the IP address.
    – nohillside
    Commented Mar 5 at 11:19
  • Yes, @nohillside , but in this question I have answered as per question details, for the local network on and his address so he can test and access from that network.
    – zhrist
    Commented Mar 7 at 21:53
  • Opening for also allows access from 192.168.1.x, limiting it is an unnecessary restriction and (in most cases) simply a bad practice.
    – nohillside
    Commented Mar 7 at 22:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .