0

I have set the default localhost server to run on my MAC with apache with the default settings. I can access the local server using localhost and the IP from the server it self but cannot access from another PC using the IP connected on the same WIFI network with a simple router. I have disabled the firewall on mac but nothing. This is my /etc/hosts file:

127.0.0.1   localhost
255.255.255.255   broadcasthost 
::1             localhost 

The mac IP on wifi is 192.168.10.102, the other PC IP is 192.168.10.105 Apache is set to listen on port 80, http.conf

Listen 80

sudo tcpdump -i en0 result:

15:35:28.384152 IP 192.168.10.105.63630 > 192.168.10.102.http: Flags [S], seq 2700046236, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
15:35:28.674606 IP 192.168.10.105.63631 > 192.168.10.102.http: Flags [S], seq 3459374519, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
15:35:29.335909 IP 192.168.10.102.51270 > 192.168.10.1.domain: 50623+ PTR? 103.10.168.192.in-addr.arpa. (45)
15:35:29.343300 IP 192.168.10.1.domain > 192.168.10.102.51270: 50623 NXDomain* 0/1/0 (95)
15:35:29.593550 IP 192.168.10.105.netbios-dgm > 192.168.10.255.netbios-dgm: NBT UDP PACKET(138)
15:35:30.345378 IP 192.168.10.102.58188 > 192.168.10.1.domain: 60091+ PTR? 255.10.168.192.in-addr.arpa. (45)
15:35:30.352597 IP 192.168.10.1.domain > 192.168.10.102.58188: 60091 NXDomain* 0/1/0 (95)
15:35:31.337113 ARP, Request who-has 192.168.10.102 tell 192.168.10.1, length 28

NOTE While restarting the MAC computer for a couple of seconds I am able to access the localhost server with IP from the other computer... Any ideas?

  • Are you able to ping it from other devices ? – pun Nov 7 '15 at 15:31
  • @The_IT_Guy_You_Don't_Like yes I am, it pings the IP correctly – albanx Nov 7 '15 at 15:34
0

After loosing almost 1 day and a half I found that Endpoint Security of Symantec blocked incoming connections. I came across this script that saved my days (disables service):

https://gist.github.com/phoob/671e65332c86682d5674

Also this is valid:

https://gist.github.com/bubenkoff/4043130

Hope helps some one other.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.