Score:0

Apache server on Macos Monterey not accepting external public IP connections... why?

bt flag

I am using MacOS Monterey 12.4 and have configured an Apache 2.4 server with virtual hosts that listen to all interfaces (0.0.0.0:80) on my host. I have tested my private ip (192.168.1.2), external-facing ip, as well as localhost on chrome and my webpage shows up as expected.

However, when I asked my colleague to enter my public IP address on a web browser to load up Apache's webpage, he sees the "[mypublicip] took too long to respond." message. Here's what I have done to diagnose this issue so far:

  1. Enabled Port Forwarding on my ISP's router (80 -> 80) with TCP enabled

  2. Temporarily disabled firewall

  3. Temporarily disabled Antivirus software

  4. Verify that Port Forwarding works by capturing the traffic sent by my colleague with Wireshark. I see his public IP attempting to establish a TCP connection ([SYN]) with my private IP, 192.168.1.2 on port 80. My host never responds to the connection which leads to many [TCP Retransmission] [TCP Port numbers reused] on his end.

  5. Checked that port 80 is enabled with nmap localhost

I am not sure why the complete TCP connection isn't established after doing all the steps above and am currently baffled. In particular, why is my host not responding to the TCP [SYN] message? Any help is greatly appreciated.

pt flag
You've tagged this question with `wireshark`. Have you used `wireshark` to verify whether or not the request is making it to your Apache server?
theptr104 avatar
bt flag
@larsks When I entered my router's public IP in chrome, I get directed to the Apache webpage and is able to capture the complete TCP connection as well as the HTTP responses. When my colleague, who's in a remote network, typed my public IP, I am only able to see what was described in step 4 above. I don't see any HTTP responses from Apache via Wireshark.
Score:0
bt flag

Seems like there is an issue with MacOS's firewall, even after I updated to Ventura. The firewall needs to be turned off and I must restart my Mac in order for the firewall changes to take effect. That's the only way I am able to access my site.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.