Add DNS forwarder to veil-proxy.#70
Closed
NullHypothesis wants to merge 1 commit into
Closed
Conversation
Users currently have little flexibility in how their enclave uses DNS:
veil-daemon's -resolver flag is all there is. Users however may also
want to configure search domains, or have the enclave's DNS handled like
the EC2 host's. To make all of that possible, this PR introduces new
command line flags to both veil-daemon and veil-proxy.
The proxy now has `-dns-forwarder`. When enabled, it instructs the
proxy to open both a UDP and TCP listener on port 53 on the tun
interface. All incoming payload (the forwarder has no understanding of
DNS; it simply shuffles around bytes) is then blindly forwarded to the
EC2 host's nameservers configured in /etc/resolv.conf.
The daemon now has `-dns-search`, `-dns-ndots`, and the PR also renames
`-resolver` to `-dns-resolver` for consistency. The two new flags allow
users to provide the search domains and ndots option, both of which are
written to the enclave's /etc/resolve.conf.
To make use of these features, start veil-proxy with the new flag:
veil-proxy -dns-forwarder
Then, set veil-daemon's resolver to the host's IP address, and you can
also provide search domains and ndots:
veil-daemon \
-dns-resolver 10.0.0.1 \
-dns-search "cluster.local" \
-dns-ndots 2
Fixes #61.
a4d7cb6 to
d739e2b
Compare
Contributor
Author
|
Continuing the work in #71. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Users currently have little flexibility in how their enclave uses DNS: veil-daemon's -resolver flag is all there is. Users however may also want to configure search domains, or have the enclave's DNS handled like the EC2 host's.
To make all of that possible, this PR introduces a new command line flag to veil-proxy: -dns-forwarder. When enabled, it instructs veil-proxy to open both a UDP and TCP listener on port 53 on the tun interface. All incoming payload (the forwarder has no understanding of DNS; it simply shuffles around bytes) is then blindly forwarded to the EC2 host's nameservers configured in /etc/resolv.conf.
To make use of this feature, start veil-proxy with the new flag:
Then, set veil-daemon's resolver to the host's IP address:
Fixes #61.