Ubuntu: dig times out while host works



Question:

I'm currently running a relatively fresh installation of Ubuntu GNOME 15.10 on a notebook connected via Wifi. Other network interfaces are present (mobile broadband, ethernet) but apart from the lo interface not connected.

When running dig example.com or dig @8.8.8.8 example.com the query times out while host example.com works fine.

The network routes fetched via route -n look fine to me. As far as I'm aware there are no filters present on this network.

I've used Debian from only command line for a few years, but I'm quite new to Ubuntu - especially with a graphical shell. I'd appreciate your help!


Solution:1

The timeout of the response from 8.8.8.8 in your network maybe greater than 15s, the default timeout of dig command. You can use +time to set the timeout for a query to n seconds. The default timeout is 5 seconds. And also use +tries set the number of times to try UDP queries to server to n instead of the default, 3:

dig +time=10 +tries=5 @8.8.8.8 example.com  


Solution:2

O.K. something weird is going on here. This problem is not Ubuntu related, but caused by some sort of weird network filtering on the network I'm using. As to why this is or what causes this I have no idea.

Apperently UDP based DNS lookups are blocked on the AP I was connected to or by the ISP. Appending the +tcp flag to dig fixed that and so does changeing the network (I couldn't try that before due to the lack of an alternative).

From what I can tell from here the ISP is Versanet (Germany) and the network uses both gear from TP-Link and Netgear. Since this is not my network I probably cannot really dig much further here.

Thank you Tung Tran for your help anyway.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »