Author Topic: ubuntu linux pc inaccessible on lan via IP  (Read 2469 times)

Ben T

ubuntu linux pc inaccessible on lan via IP
« on: 16 May, 2017, 01:04:46 pm »
Have an ubuntu (16.04) machine which is inaccessible to any other machine on the LAN.
I'm sure its ubuntu's fault, not the client, as i have tried two different clients:
- windows 10 browsing to ubuntu's installed web server - and pinging (get destination host unreachable)
- android browsing to ubuntu's installed web server via its IP

When I run "arp" on it, I get:

Code: [Select]
root@ben-Ideapad-Z560:/home/ben# arp
Address                  HWtype  HWaddress           Flags Mask            Iface
dsldevice.lan            ether   c4:ea:1d:61:29:8a   C                     wlp6s0b1
android-114a49f9c196d5d          (incomplete)                              wlp6s0b1
DESKTOP-E7FSRP5.lan              (incomplete)                              wlp6s0b1

it must be slightly getting through in some way, because DESKTOP-E7FSRP5 is the name of the windows machine I tried (but failed) to access it from, and android-114a49f9c196d5d is obviously an android device, obviously the other client I tried to access it from.

ifconfig prints:
Code: [Select]
root@ben-Ideapad-Z560:/home/ben# ifconfig
root@ben-Ideapad-Z560:/home/ben# ifconfig
lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:8518 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8518 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:1195750 (1.1 MB)  TX bytes:1195750 (1.1 MB)

wlp6s0b1  Link encap:Ethernet  HWaddr 00:26:82:a5:81:e7 
          inet addr:192.168.1.87  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::8e66:195e:4415:8195/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:213841 errors:0 dropped:0 overruns:0 frame:0
          TX packets:139963 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:199630788 (199.6 MB)  TX bytes:22408391 (22.4 MB)



iptables -L prints:

Code: [Select]
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         



route -n prints:

Code: [Select]
root@ben-Ideapad-Z560:/home/ben# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.254   0.0.0.0         UG    600    0        0 wlp6s0b1
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp6s0b1
192.168.1.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp6s0b1


Feanor

  • It's mostly downhill from here.
Re: ubuntu linux pc inaccessible on lan via IP
« Reply #1 on: 16 May, 2017, 01:09:12 pm »
Sounds like a firewall issue to me.

Ben T

Re: ubuntu linux pc inaccessible on lan via IP
« Reply #2 on: 16 May, 2017, 02:38:29 pm »
I don't think so because the ubuntu machine hasn't got a firewall.
"ufw status" reports "Status: Inactive"
even if you're right, what steps can be taken?

Re: ubuntu linux pc inaccessible on lan via IP
« Reply #3 on: 16 May, 2017, 04:06:04 pm »
Are you sure nothing else on the network is on 192.168.1.87? What about an incorrect entry in the arp cache of the Windows 10 machine for that IP address? (arp -a to check and arp -d * to flush the arp cache on Windows).

What on the local network responds to ping from the Ubuntu machine? (Ping individual addresses and maybe the 192.168.1.255 broadcast address).

Can you get to the outside world from the Ubuntu machine (if it supposed to)?

Are you sure the network cable is plugged in?
"Yes please" said Squirrel "biscuits are our favourite things."

Re: ubuntu linux pc inaccessible on lan via IP
« Reply #4 on: 16 May, 2017, 04:35:48 pm »
What's the output from:

"sudo ufw status"

Re: ubuntu linux pc inaccessible on lan via IP
« Reply #5 on: 16 May, 2017, 05:02:39 pm »
"ufw status" reports "Status: Inactive"
"Yes please" said Squirrel "biscuits are our favourite things."

Ben T

Re: ubuntu linux pc inaccessible on lan via IP
« Reply #6 on: 16 May, 2017, 06:39:56 pm »
Are you sure nothing else on the network is on 192.168.1.87? What about an incorrect entry in the arp cache of the Windows 10 machine for that IP address? (arp -a to check and arp -d * to flush the arp cache on Windows).

What on the local network responds to ping from the Ubuntu machine? (Ping individual addresses and maybe the 192.168.1.255 broadcast address).

Can you get to the outside world from the Ubuntu machine (if it supposed to)?

Are you sure the network cable is plugged in?

Nothing else on the network is on 192.168.1.87, the router's list of devices confirms this, and the ubuntu's DHCP lease is set to 'infinite'.

arp -a on windows reports
Code: [Select]
Interface: 192.168.1.71 --- 0x5                                                                                           Internet Address      Physical Address      Type                                                                       
192.168.1.65          c0-3e-0f-05-59-75     dynamic                                                                     
192.168.1.66          c0-3e-0f-09-8a-47     dynamic                                                                     
192.168.1.72          d0-df-9a-8e-03-47     dynamic                                                                     
192.168.1.254         c4-ea-1d-61-29-8a     dynamic                                                                     
192.168.1.255         ff-ff-ff-ff-ff-ff     static                                                                     
224.0.0.22            01-00-5e-00-00-16     static                                                                     
224.0.0.251           01-00-5e-00-00-fb     static                                                                     
224.0.0.252           01-00-5e-00-00-fc     static                                                                     
224.0.0.253           01-00-5e-00-00-fd     static                                                                     
239.255.255.250       01-00-5e-7f-ff-fa     static                                                                     
255.255.255.255       ff-ff-ff-ff-ff-ff     static   

The ubuntu machine can see the internet ok, it does not have a network cable but is connected via wifi. Should that matter?

IIRC this used to work when it was on ubuntu 14 (over wifi), the problem has started since I upgraded to 16.


Re: ubuntu linux pc inaccessible on lan via IP
« Reply #7 on: 16 May, 2017, 07:41:36 pm »
So it's not just ping that it's not responding to? It's TCP traffic too?

If it was just ping then I'd check:-

cat /proc/sys/net/ipv4/icmp_echo_ignore_all

which should be 0

The IP not appearing in the arp cache on the Windows machine is odd, it looks like the router is acting as the firewall.

Sure it's not a router that can configure certain DHCP addresses to be on a separate VLAN or DMZ or something?
"Yes please" said Squirrel "biscuits are our favourite things."

Re: ubuntu linux pc inaccessible on lan via IP
« Reply #8 on: 16 May, 2017, 07:50:03 pm »
Some routers have a wireless setting that prevents wireless devices communicating with each other at all. It only lets the wireless device talk to the router and thus the internet.
I think you'll find it's a bit more complicated than that.

Kim

  • Timelord
    • Fediverse
Re: ubuntu linux pc inaccessible on lan via IP
« Reply #9 on: 16 May, 2017, 08:12:16 pm »
Some routers have a wireless setting that prevents wireless devices communicating with each other at all. It only lets the wireless device talk to the router and thus the internet.

This.  "Wireless isolation" or some such.

Feanor

  • It's mostly downhill from here.
Re: ubuntu linux pc inaccessible on lan via IP
« Reply #10 on: 16 May, 2017, 08:16:20 pm »
But but but...
He said it worked under an earlier version of Ubuntu....

Re: ubuntu linux pc inaccessible on lan via IP
« Reply #11 on: 16 May, 2017, 09:24:02 pm »
Anything in the router log?
Quote from: tiermat
that's not science, it's semantics.

jiberjaber

  • ... Fancy Pants \o/ ...
  • ACME S&M^2
Re: ubuntu linux pc inaccessible on lan via IP
« Reply #12 on: 16 May, 2017, 10:48:15 pm »
Have you tried running wireshark or running a tcpdump on the ubuntu box and looking to see what's going wrong.  It's obviously 'hearing' stuff as there is an ARP table and a load of RX packets, is your DHCP not providing a suitable gateway so the Ubuntu box can get out to the internet (via the router) but is unable to get out anywhere else....

Ideally, if you have ssh access to your router, you could tcpdump from there and pipe it via netcat to a machine running wireshark & netcat and filter on the IP addresses you are interested in.

ETA:  What's the router IP?, your gw is 192.168.1.254, if that isn't your router IP, then that might be your problem - though odd if it's DHCP, unless you've configured separate DHCP for that mac address from the router?
Regards,

Joergen

Jaded

  • The Codfather
  • Formerly known as Jaded
Re: ubuntu linux pc inaccessible on lan via IP
« Reply #13 on: 16 May, 2017, 11:20:11 pm »
I think you may need to consider the option that thought leadership doesn't come in to it. It is probably not lan, but it could be anther forummer.
It is simpler than it looks.

Re: ubuntu linux pc inaccessible on lan via IP
« Reply #14 on: 16 May, 2017, 11:38:52 pm »
But but but...
He said it worked under an earlier version of Ubuntu....

If it's a different IP (from the DHCP lease) then the "Wireless Isolation" option might not have been disabled for this "new" host.

(Not sure why an OS upgrade would make it a new host I'm not sure as the MAC address(es) would not have changed...)
"Yes please" said Squirrel "biscuits are our favourite things."

Ben T

Re: ubuntu linux pc inaccessible on lan via IP
« Reply #15 on: 22 May, 2017, 09:08:21 pm »
I've reinstalled ubuntu 17 and it now works with that.
Might never know what it was, but feel free to speculate.
Thanks for the suggestions.