unbound-daemon: init script causes DNS request over WAN but means to use localhost as destination
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Maintainer: @EricLuehrsen
Environment: x86_64, generic, 23.05.2
Description:
When dnsmasq is enabled, and Unbound is configured to listen at port 53, the Unbound init script makes a DNS request which can leave your WAN interface (visible in Wireshark, see below).
In the function resolv_setup(), there's the bug ...:
nslookup localhost 127.0.0.1#53 >/dev/null 2>&1
... when fixed, it becomes ...:
nslookup localhost 127.0.0.1:53 >/dev/null 2>&1
The original code might have always caused DNS requests to leave WAN, unless some older version of busybox (nslookup) perhaps did accept the '#' syntax to denote the port, but I don't know whether that's the case.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the unbound-daemon init script and its resolv_setup() function, then inspect the nslookup invocation shown in the report. Confirm the port syntax supported by the shipped nslookup and verify that the resulting lookup targets localhost:53 rather than sending a request over the WAN.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100