0

I am trying to serve an application I'm developing over the LAN at work. I'm doing this using Apache and this is working fine locally, but when I try to access from another client on the network the http request is timing out. The requests are definitely hitting the Mac as in /var/log/trac.log I can see:

[ 94 14855][20 May 13:15:29][TR_FIREWALL] CFirewallWrapper::NotifyCallback: cRule = rule-3, srcIp=172.18.48.116, dstIp=172.18.48.240

I'm serving over an arbitrary port (23736) to avoid any conflicts but I don't believe the problem lies with apache. If I locally browse to 172.18.48.240:23736 there is no problem. When the external client requests the same there is nothing being added to the Apache access/error logs.

The firewall in system preferences is disabled and I've added the following to /etc/pf.conf:

pass in proto tcp from any to any port 23736

before running:

sudo pfctl -vnf /etc/pf.conf

and rebooting.

At this point I'm just about out of ideas so any help greatly appreciated

1
  • Perhaps better over on stackoverflow.com or networkengineering.stackexchange.com?
    – JMY1000
    May 20 '16 at 20:01
1

You shouldn't need a firewall rule to forward packets because Apache can listen on your selected port. Leaving it as port 80 also won't conflict with anything.

What you need to look at is your httpd.conf file. Specifically, the "Listen" directive

# Listen: Allows you to bind Apache to specific IP addresses and/or
# Change this to Listen on specific IP addresses as shown below to 
#Listen 12.34.56.78:80
Listen 23736

Since it's working locally, but not on another client (I'm assuming on the same subnet), you may have the directive set as localhost:23736.

If that's the case, it would cause the symptoms that you are seeing.

What you should have is what I posted above, or to restrict it to a particular IP:

Listen 172.18.48.240:23736

Once you make the change, restart Apache.

2
  • no it's set to Listen: 23736 and when i say it's working locally in the browser I'm navigating to my network address rather than localhost ie 172.18.48.240:23736
    – Cathal
    May 20 '16 at 12:40
  • Your statement that there's nothing in the access/error log means that Apache didn't see it. Your firewall is probably blocking it then. Turn off your firewall and see if it resolves it.
    – Allan
    May 20 '16 at 12:43

You must log in to answer this question.

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