I am having a similar issue as this, where some public wifi works on my iPhone and not on my Mac (Big Sur 11.6.1)

iPhone connects to public Wi-Fi but Mac doesn't - why?

Other public wifi works fine.

Troubleshooting further, I see that the wifi itself connects, I got an IP address but the TCP connection times out when trying to connect to the captive portal. I can ping the IP where I get redirected (something like, but can't establish an HTTP connection on port 8000. It's a TCP issue rather than a cert error, because it doesn't even get a TCP connection established (confirmed with curl -v). My phone can reach the same port and IP on the same wifi.

I suspect some settings might be blocking outbound TCP - where should I look? Settings & Privacy > Firewall seems to be focused on inbound connections.

  • The settings under Firewall are indeed focused on inbound connections, but the underlying mechanism (called the packet filter) may be still blocking the traffic. To make sure that's not the case, could you run sudo pfctl -F all -ef /etc/pf.conf to reload the default set of rules? Do you have VPN software installed or a VPN configured on your Mac?
    – jaume
    Commented Apr 26, 2022 at 18:04
  • 1
    @jaume sudo pfctl -d did the trick. Once I was connected to wifi then I could re-enable with pfctl -e. I suspect the issue is this particular wifi used port 8000 which wasn't as common as 80 or 8080. The weird thing is, though, I couldn't find any particular rule that blocked the outgoing traffic or a default block-all rule, so I'm not sure why the config was blocking it to begin with. Commented Apr 26, 2022 at 22:11
  • Very good! It'd be great if you could you rewrite your comment into a answer. You can then mark you answer as accepted to help others that have a similar issue.
    – jaume
    Commented Apr 27, 2022 at 6:26

1 Answer 1


It turned out there was packet filtering blocking port 8000 outbound. Most public wifi doesn't have this problem because more common ports 80, 443, 8080, 8443 were not blocked.

Disabling the packet filtering (sudo pfctl -d) worked and then I could re-enable it after getting through the captive portal.

I'm still not sure why 8000 was blocked in the first place. I saw pass rules for ports 80, 8080, etc., but I didn't see any outbound default rules to block everything not explicitly passed.

Thanks to @jaume for pointing me at pfctl. I knew about iptables on Linux but not the equivalent on Mac.

  • Please condiser marking the answer as accepted if it answers your problem, it will avoid Community bumping the question as unanswered.
    – Thinkr
    Commented May 22, 2023 at 19:02

You must log in to answer this question.

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