{"action":"created","issue":{"url":"https://api.github.com/repos/pi-hole/pi-hole/issues/2443","repository_url":"https://api.github.com/repos/pi-hole/pi-hole","labels_url":"https://api.github.com/repos/pi-hole/pi-hole/issues/2443/labels{/name}","comments_url":"https://api.github.com/repos/pi-hole/pi-hole/issues/2443/comments","events_url":"https://api.github.com/repos/pi-hole/pi-hole/issues/2443/events","html_url":"https://github.com/pi-hole/pi-hole/issues/2443","id":365880164,"node_id":"MDU6SXNzdWUzNjU4ODAxNjQ=","number":2443,"title":"Using Pi-hole's DNS for local name resolution is not working - wrong configuration and/or missing DNS directives","user":{"login":"74cmonty","id":12523591,"node_id":"MDQ6VXNlcjEyNTIzNTkx","avatar_url":"https://avatars0.githubusercontent.com/u/12523591?v=4","gravatar_id":"","url":"https://api.github.com/users/74cmonty","html_url":"https://github.com/74cmonty","followers_url":"https://api.github.com/users/74cmonty/followers","following_url":"https://api.github.com/users/74cmonty/following{/other_user}","gists_url":"https://api.github.com/users/74cmonty/gists{/gist_id}","starred_url":"https://api.github.com/users/74cmonty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/74cmonty/subscriptions","organizations_url":"https://api.github.com/users/74cmonty/orgs","repos_url":"https://api.github.com/users/74cmonty/repos","events_url":"https://api.github.com/users/74cmonty/events{/privacy}","received_events_url":"https://api.github.com/users/74cmonty/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-02T12:45:23Z","updated_at":"2018-10-02T17:30:24Z","closed_at":null,"author_association":"NONE","body":"**In raising this issue, I confirm the following:** `{please fill the checkboxes, e.g: [X]}`\r\n\r\n- [x] I have read and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md).\r\n- [x] The issue I am reporting can be *replicated*.\r\n- [x] The issue I am reporting isn't a duplicate (see [FAQs](https://github.com/pi-hole/pi-hole/wiki/FAQs), [closed issues](https://github.com/pi-hole/pi-hole/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), and [open issues](https://github.com/pi-hole/pi-hole/issues)).\r\n\r\n**How familiar are you with the the source code relevant to this issue?:**\r\n\r\n`1`\r\n\r\n---\r\n**Expected behaviour:**\r\n\r\n`I want a working DNS for local name resolution.`\r\n\r\n**Actual behaviour:**\r\n\r\n`Local DNS fails; server's IP in LAN is not considered`\r\n\r\n**Steps to reproduce:**\r\n\r\nBasically I followed [these](https://discourse.pi-hole.net/t/howto-using-pi-hole-as-lan-dns-server/533) instructions to configure Pi-hole's DNS for local name resolution.\r\nThis means I've executed the following steps:\r\n1. echo \"addn-hosts=/etc/pihole/lan.list\" | sudo tee /etc/dnsmasq.d/02-lan.conf\r\n2. maintain /etc/pihole/lan.list\r\n3. pihole restartdns\r\n\r\nTo verify if this is working I used\r\n```\r\nroot@ct101-pihole:~# dig devklaud.whl.biszumbitterenen.lan\r\n\r\n; <<>> DiG 9.10.3-P4-Debian <<>> devklaud.whl.biszumbitterenen.lan\r\n;; global options: +cmd\r\n;; Got answer:\r\n;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 23307\r\n;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1\r\n\r\n;; OPT PSEUDOSECTION:\r\n; EDNS: version: 0, flags:; udp: 4096\r\n;; QUESTION SECTION:\r\n;devklaud.whl.biszumbitterenen.lan. IN  A\r\n\r\n;; AUTHORITY SECTION:\r\n.                       7942    IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2018100200 1800 900 604800 86400\r\n\r\n;; Query time: 28 msec\r\n;; SERVER: 46.182.19.48#53(46.182.19.48)\r\n;; WHEN: Tue Oct 02 14:38:01 CEST 2018\r\n;; MSG SIZE  rcvd: 137\r\n\r\nroot@ct101-pihole:~# nslookup devklaud.whl.biszumbitterenen.lan\r\nServer:         46.182.19.48\r\nAddress:        46.182.19.48#53\r\n\r\n** server can't find devklaud.whl.biszumbitterenen.lan: NXDOMAIN\r\n```\r\nThe output confirms that local name resolution fails.\r\n\r\nI investigated on this issue assuming that Pi-hole is running dnsmasq and found [this](https://www.linux.com/learn/dnsmasq-easy-lan-name-services) webpage.\r\nFrom this the following questions arise:\r\nWhere must I maintain the host information for local name resolution? \r\nIn _/etc/pihole/lan.list_ or _/etc/hosts_?\r\nWhy are some relevant DNS directives not maintainable, e.g. _expand-hosts, listen-address, bind-interfaces_?\r\nI can find these directives in _/etc/.pihole/advanced/dnsmasq.conf.original_, though.\r\n\r\n**Debug token provided by [uploading `pihole -d` log](https://discourse.pi-hole.net/t/the-pihole-command-with-examples/738#debug):**\r\n\r\n`7cv7a2uy3f`\r\n\r\n**Troubleshooting undertaken, and/or other relevant information:**\r\n\r\n`Maintained /etc/pihole/lan.list and /etc/dnsmasq.d/02-lan.conf\r\nRestarted DNS service`\r\n"},"comment":{"url":"https://api.github.com/repos/pi-hole/pi-hole/issues/comments/426361727","html_url":"https://github.com/pi-hole/pi-hole/issues/2443#issuecomment-426361727","issue_url":"https://api.github.com/repos/pi-hole/pi-hole/issues/2443","id":426361727,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjM2MTcyNw==","user":{"login":"Mcat12","id":4417660,"node_id":"MDQ6VXNlcjQ0MTc2NjA=","avatar_url":"https://avatars2.githubusercontent.com/u/4417660?v=4","gravatar_id":"","url":"https://api.github.com/users/Mcat12","html_url":"https://github.com/Mcat12","followers_url":"https://api.github.com/users/Mcat12/followers","following_url":"https://api.github.com/users/Mcat12/following{/other_user}","gists_url":"https://api.github.com/users/Mcat12/gists{/gist_id}","starred_url":"https://api.github.com/users/Mcat12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mcat12/subscriptions","organizations_url":"https://api.github.com/users/Mcat12/orgs","repos_url":"https://api.github.com/users/Mcat12/repos","events_url":"https://api.github.com/users/Mcat12/events{/privacy}","received_events_url":"https://api.github.com/users/Mcat12/received_events","type":"User","site_admin":false},"created_at":"2018-10-02T17:30:24Z","updated_at":"2018-10-02T17:30:24Z","author_association":"MEMBER","body":"> ;; SERVER: 46.182.19.48#53(46.182.19.48)\r\n\r\nYou are not using Pi-hole for DNS."}}
{"actor":{"display_login":"Mcat12"}}