Abby Wu
Abby Wu

Reputation: 61

Cannot reach site via local network to Apache2 server

I just installed Apache2 on Ubuntu Server 16.04.1 LTS and its ip is 192.168.1.107

I have another laptop with ip 192.168.1.103

I failed to send http://192.168.1.107 on laptop's browser because it showed 'This site can’t be reached' back.

On server itself curl http://localhost is correct.

I don't know why I cannot access it on another computer in the same local network.

And not sure which conf file I should check for Apache2.

sudo iptables -L

Chain INPUT (policy ACCEPT)
target    prot opt source    destination
ACCEPT    tcp  --  anywhere  anywhere    tcp dpt:http
Chain FORWARD (policy ACCEPT)
target    prot opt source    destination
Chain OUTPUT (policy ACCEPT)
target    prot opt source    destination

ping 192.168.1.103

PING 192.168.1.103 (192.168.1.103) 56(84) bytes of data.
FROM 192.168.1.107 icmp_seq=1 Destination Host Unreachable
FROM 192.168.1.107 icmp_seq=2 Destination Host Unreachable
FROM 192.168.1.107 icmp_seq=3 Destination Host Unreachable

ping 192.168.1.107

PING 192.168.1.107 (192.168.1.107) 56(84) bytes of data.
From 192.168.1.103 icmp_seq=1 Destination Host Unreachable
From 192.168.1.103 icmp_seq=2 Destination Host Unreachable
From 192.168.1.103 icmp_seq=3 Destination Host Unreachable
From 192.168.1.103 icmp_seq=4 Destination Host Unreachable

arp -a

3820TG.Home (192.168.1.103) at <incomplete> on wlx74da386a0cb2

Upvotes: 1

Views: 1711

Answers (2)

Shiji.J
Shiji.J

Reputation: 1631

Few things to check:

  1. On the server, sudo iptables -L
  2. Ping test: run ping 192.168.1.107 on your laptop.
  3. Another Ping: run ping 192.168.1.103 on your server.

Follow these steps and append the results to your question.

Update 1:

  • Firewall is good
  • Can't ping from both sides.

Next Step, Check you router.

If you are using a wireless router, check if there is any setting called AP Isolation on the router, disable it.

If there is no such settings, check if you are connecting to a Guest Network/WIFI.

Both settings will prevent you from accessing any devices in your local network except the router itself.

Upvotes: 1

AminSojoudi
AminSojoudi

Reputation: 2016

Check Firewall Rules, I think your firewall blocks the port 80.

sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT

Upvotes: 2

Related Questions