Ubuntu – Internet conection problem when updating Ubuntu 12.04 to 14.04 Server

14.04dnsinternetnetworkingserver

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

Best Answer

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.

Related Question