6

Upgraded my server's software from Ubuntu 12.04 to Ubuntu 14.04 and now the server cannot access the internet.

I can ping devices on my LAN, including my modem. When I try to ping any site on the internet (8.8.8.8 for example), I get 100% packet loss. I feel like this may be a DNS issue from what I've been reading. I've added the following line to /etc/network/interfaces :

dns-nameservers 8.8.8.8 8.8.4.4

with no success.

Relevant outupt of ifconfig :

eth0     Link encap:Ethernet  HWaddr 64:31:50:1f:88:72
          inet addr:192.168.0.222  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::6631:50ff:fe1f:8872/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:575229 errors:0 dropped:55 overruns:0 frame:0
          TX packets:10313 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:35490659 (35.4 MB)  TX bytes:898607 (898.6 KB)

output of route -n:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0

Content of /etc/network/interfaces file :

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

address 192.168.0.222
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 8.8.8.8 8.8.4.4  

output of tracepath 8.8.8.8 :

1?: [LOCALHOST]                                         pmtu 1500
1:  192.168.0.1                                           0.446ms
1:  192.168.0.1                                           0.444ms
2:  no reply`  
3:  no reply`    
//continues with no reply until interrupted
24
  • 2
    If you can't ping external hosts even by numeric IP (such as 8.8.8.8) then it is more than a DNS issue. Can you add the result of route -n to your post please? Aug 15, 2014 at 17:56
  • 2
    What is 192.168.0.1? Is it a router or the address of your modem? (It must be a router to work but may be a modem with an operating integrated router). Another idea: Might there be another device using 192.168.0.222? Aug 15, 2014 at 18:49
  • 2
    In your position I'd do several things. First I'd try to ping the address of the ISP router your router talks to. Second I'd do the same tests from another device on your network. Third, if the other device works and your new OS fails I'd double check the working devices IP related confiration with the non-working one. It's easy to miss a single character. You don't need DNS to work to ping IP addresses. Aug 15, 2014 at 19:11
  • 1
    Are any other devices on your LAN able to ping anything external? And is your internet connection actually up? Aug 22, 2014 at 3:32
  • 1
    @JoeSniderman all other devices on LAN are able to ping externally. Internet connection is working fine on all other devices.
    – user259743
    Aug 22, 2014 at 3:42

3 Answers 3

2
+50

Looks like an unusual one this...

Firstly I sincerely doubt that DNS is involved, though if you are using 8.8.8.8 et al for your DNS then DNS will fail because you can't reach those servers.

Firstly it can't be your LAN configuration because you can ping your local gateway, so traffic to and from it works.

The biggest hint is the double listing of your gateway in the trace. Your gateway should only be shown once, and this hints at a loop at your gateway - but all your other systems work fine, and according to what you write, it's only the local system that changed.

The only thing that I can remotely think of is if you had an iptables rule roughly like this:

iptables -t nat -D POSTROUTING ! -d 192.168.0.0/24 -j SNAT --to-source 1.2.3.4

Where 1.2.3.4 is some bogus or possibly previously valid IP address that no longer works.

This would let local traffic work but anything going out beyond the local network would break because replies would go to the wrong place. Your gateway may block traffic like that because it is in essence 'spoofed' traffic.

I think you would get a good hint to the issue with some traffic inspection at your gateway if it is at all possible.

If you can't do that - quite understandable - then maybe set up another Linux box on your network and make it the default gateway for this faulty system, and then you can inspect the traffic it is generating. This is assuming that the fault is on the upgraded system. If you configured that 2nd Linux box to ip_forward and make it's gateway the 192.168.0.1 device you might also see more useful info to help nail down the cause.

Will be interesting to see what it was when you finally get it sorted.

1
  • the double listing of the gateway is common on the use of home routers as its "routing" between the switch and the "external interface" lol. I have the same results at my own place. Although you are right on discarding gateway issues if other devices can communicate ok, and server can ping gateway... this is pretty strange as you say..
    – Manco1911
    Oct 12, 2014 at 2:15
0

Try to go into "/etc/resolv.conf" and below the lines starting with #'s add these lines: "nameserver 8.8.8.8" "nameserver 8.8.4.4" See if you can connect after doing this. Do not reboot after changing the file, just save it and test your connection. If this works then it was a DNS problem. The changes made to the file will be undone after a reboot.

-1

I had exactly the same situation - no internet connection, no ping to outside, no ping from router to the box. But a working SSH connection from another workstation in the same LAN. The cause was the router who was blocking the new box as it had the same IP as the replaced old box, but a different MAC address. As soon as I changed the IP everything worked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .