Can't connect to local server from other devices (connected via wifi) when the server is connected via wifi

There is home network: 192.168.1.0/24, default gateway 192.168.1.1 (DHCP)

There is a web server which is running on a host, lets call the host "server".

There are several devices which are connected to the router via wifi (clients).

Problem: clients can't connect to the server when it is connected to the network via wifi. But they are able to connect to it when it is connected via ethernet.

"can't connect" means:

  • http ://192.168.1.15/myservice - "Oops! Google Chrome could not connect to 192.168.1.15"

  • telnet/ping 192.168.1.15 - "Destination Host Unreachable"

Server: Ubuntu 12.04 x86_64 (kernel 3.8.0-35-generic)

# ufw status

Status: inactive

# iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Server ethernet network configuration

# ifconfig eth2

inet addr:192.168.1.14  Bcast:192.168.1.255  Mask:255.255.255.0

# netstat -rn

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth2
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth2
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth2

Server wifi network configuration

# ifconfig eth3

inet addr:192.168.1.15  Bcast:192.168.1.255  Mask:255.255.255.0

# netstat -rn

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth3
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth3
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth3

JIC, I'm able to connect to my wifi interface from(!) the server (but probably it just connects via loopback interface instead).

What the problem?


Solution 1:

While I think all of the answers already provided are good guesses, I think there's 2 possibilities here. Either Daniel B. was on to something with the "AP isolation" idea, or there's a problems with arp.

I couldn't be of much help telling you how to check for your routers "AP isolation" settings because I'm sure it's quite dependent on whether or not that functionality exists in your particular router and what sort of UI your router offers. Being that this question is quite old I don't imagine that I'll get a response on that either but if OP does respond I'd be willing to research it and provide instructions for how to check/fix.

I can tell you how to check if it's a problem with arp. If you're running windows clients, start an administrative command prompt. In windows 10, click start, type "cmd" and then right click on command prompt and select "run as administrator" on the context menu. At the command prompt, you can type "arp -a";

C:\Windows\system32>arp -a 192.168.1.15

Interface: 192.168.0.123 --- 0x13
Internet Address      Physical Address      Type
192.168.1.15          00-50-56-3e-ce-3e     dynamic

Make sure that the MAC address listed matches the MAC address of your wireless card. If it's not, you could try clearing the arp cache...

C:\Windows\system32>arp /d 192.168.1.15

Try to ping the server address 192.168.1.15 from your client again and then check the arp cache again to see if it gets the correct MAC address for the wireless card on your server. If it doesn't then there's probably some settings you need to change on your wireless router and, again, I can't really provide much help with that without more information.