2

Running Ubuntu 16.04, I can connect to other websites fine:

ping google.com
PING google.com (172.217.25.206) 56(84) bytes of data.
64 bytes from nrt12s13-in-f14.1e100.net (172.217.25.206): icmp_seq=1 ttl=54 time=42.6 ms

ping yahoo.com
PING yahoo.com (98.137.246.7) 56(84) bytes of data.
64 bytes from media-router-fp1.prod1.media.vip.gq1.yahoo.com (98.137.246.7): icmp_seq=1 ttl=49 time=252 ms

But I can't ping Github or access it in my browser:

ping github.com
PING github.com (192.30.255.112) 56(84) bytes of data.
From 192.168.0.60 icmp_seq=1 Destination Host Unreachable

However, from another PC on the same network everything works fine:

ping github.com
PING github.com (192.30.255.112) 56(84) bytes of data.
64 bytes from lb-192-30-255-112-sea.github.com (192.30.255.112): icmp_seq=1 ttl=48 time=141 ms

What's going on here? I have a feeling it's something to do with Github's IP address's first octet being the same as the local one: 192.xxx.xxx.xxx.

EDIT: Output of sudo route -n:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.179.1   0.0.0.0         UG    600    0        0 wlp3s0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 enp0s31f6
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
192.0.0.0       0.0.0.0         255.0.0.0       U     100    0        0 enp0s31f6
192.168.179.0   0.0.0.0         255.255.255.0   U     600    0        0 wlp3s0
Omegastick
  • 165
  • 1
  • 8

1 Answers1

1

It turned out there was another interface on a local network (with the address 192.168.xxx.xxx) that had the bitmask set to 255.0.0.0. I used nmtui to change the bitmask of that interface to 255.255.0.0 and that fixed the problem.

Omegastick
  • 165
  • 1
  • 8
  • never route non private IP except if you perfectly know what your doing. This would lead to all sorts of issue. Always use the smallest network to route, a too general route is usually a bad sign. – Kiwy Sep 12 '18 at 09:14