albanx
albanx

Reputation: 6333

Cannot access with IP from other devices, localhost server on MAC

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... Also the MAC has installed Symanctec End Point Protection which I cannot find a way to disable it even I have sudo permissions.

Any ideas?

Upvotes: 2

Views: 2569

Answers (1)

albanx
albanx

Reputation: 6333

After loosing almost 1 day and a half I found that Endpoint Security of Symantec blocked incomming 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.

Upvotes: 1

Related Questions