You are not logged in.

#1 2017-05-09 18:29:56

TheTechromancer
Member
Registered: 2015-12-28
Posts: 6

[SOLVED] Some Programs Unable to Resolve DNS Hostnames

Greetings!

I'm experiencing some strange DNS issues on my fresh(ish) install.  Different programs behave differently, but none of them can resolve hostnames (the one exception seems to be pacman, which still works great).  For example, a ping command to a host on the internet will return the error "Name or service not known".   Inspecting the traffic in Wireshark shows that no DNS requests are sent.  Alternatively, Chromium cannot load webpages and says, "DNS_PROBE_FINISHED_BAD_CONFIG", even though a DNS query is sent and receives a valid response.  I can access all hosts directly via their IP addresses, including my DNS servers.

DNS queries in nslookup, host, etc. fail until a server is manually specified, after which they work fine.  Both wireless and wired connections have the same issue - the wireless interface is managed by NetworkManager, while the wired one is not.

Contents of /etc/resolv.conf:

# Generated by resolvconf
nameserver 8.8.8.8
nameserver 8.8.4.4

Output of "host -v google.com":

Trying "google.com"
;; connection timed out; no servers could be reached

Output of "host google.com 8.8.8.8":

Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:

google.com has address 24.220.112.180
google.com has address 24.220.112.178
...

Arch is up-to-date, and here's what I've already tried:

1. Editing resolv.conf
2. Reinstalling openresolv, networkmanager, dhcpcd (tried --force)
3. Turning it off and back on again

Thanks for your time!

UPDATE:

I found the problem after checking permissions on /etc/resolv.conf.  It was set to 600, and changing it to 644 fixed the issue.  I've no earthly idea how that happened, but it explains why pacman was working, considering the fact that it was running as root.

Last edited by TheTechromancer (2017-05-09 19:44:20)

Offline

#2 2017-05-09 19:08:21

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Some Programs Unable to Resolve DNS Hostnames

Please edit your thread title to one that accurately describes your issue: https://wiki.archlinux.org/index.php/Co … ow_to_post


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-05-09 19:10:37

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] Some Programs Unable to Resolve DNS Hostnames

Maybe you've set iptables rules that are blocking this? You can check with "sudo iptables -L" (and ip6tables for ipv6).

Offline

#4 2017-05-09 19:25:30

TheTechromancer
Member
Registered: 2015-12-28
Posts: 6

Re: [SOLVED] Some Programs Unable to Resolve DNS Hostnames

iptables chains appear to be empty:

Chain INPUT (policy ACCEPT)
target     proto opt source                 destination

Chain FORWARD (policy ACCEPT)
target     proto opt source                 destination

Chain OUTPUT (policy ACCEPT)
target     proto opt source                 destination

Offline

Board footer

Powered by FluxBB