Google Public DNS has quietly enabled support for DNS over TLS
Suddenly, without prior announcement, at ???.8 earned DNS over TLS. Earlier, Google announced only support for 3r311. DNS over https.
Public resolver from CloudFlare with IP address ???.1 3r3644. supports DNS over TLS since the launch of the project.
3r3355. Why is it needed
When using the classic DNS scheme, providers can crawl their dirty paws into your DNS packets, see which domains you request, and replace the answers as you like. Scammers are doing the same thing, replacing resolvers on hacked routers in order to direct the user to a fake server.
With DNS over TLS /HTTPS, requests are sent inside an encrypted tunnel so that the provider cannot change or view the request.
And with the advent of domain name encryption in X.509 certificates (3-33331. ESNI 3-33364.), Locking via DPI over SNI (Server Name Indication, a special field in which the domain name is transmitted in the first TLS packet) will not be possible. major providers.
3r3355. How it works 3r3356.
A TCP connection is made to TCP port 85? and a resolver certificate is verified using system root certificates, just like HTTPS in a browser. This eliminates the need to add any keys manually. A normal DNS query is performed inside the tunnel. This creates less overhead than DNS over HTTPS, which adds HTTP headers to the request and response.
Unfortunately, currently only Android 9 (Pie) support DNS over TLS is built into the system resolver.
Setup Instructions for Android 9 .
For other systems, it is proposed to use a third-party daemon, and direct the system resolver to localhost (???.1).
3r3355. Setup on macOS
Let us analyze the DNS over TLS setting on the latest version of macOS, using the example of resolver knot
3r3633.
Installation
brew install knot-resolver
By default, knot will work as a regular recursive resolver, like dnsmasq.
We edit the config
nano /usr /local /etc /kresd /config
And add to the end of the file:
policy.add (3–3–3263. policy.all (3–3–3263. policy.TLS_FORWARD ({3r3–3263. {'???.8', hostname = '???.1'}, 3r3–3263. {'???.4', hostname = '???.4 '}
}))) 3r33263.
As a result, my config looks like this:
3r3163. 3r3164. Open spoiler [/b] 3r3r1616.
- Config file example useable for personal resolver.
- The goal is to have a validating resolver with tiny memory footprint,
- while actively tracking and refreshing.
- Refer to manual: https://knot-resolver.readthedocs.io/en/latest/daemon.html#configuration
- Listen on localhost (default)
- net = {'???.1', ':: 1'}
- Drop root privileges
- user ('knot-resolver', 'knot-resolver')
- Auto-maintain root TA
trust_anchors.file = 'root.keys'
- Load Useful modules
modules = {
'policy', - Block queries to local zones
'hints', - customize root hints
'stats', - Track internal statistics
'predict', - Prefetch expiring /frequent records
}
- Smaller cache size
cache.size = 10 * MB
policy.add (3–3–3263. policy.all (3–3–3263. policy.TLS_FORWARD ({3r3–3263. {'???.8', hostname = '???.1'}, 3r3–3263. {'???.4', hostname = '???.4 '}
}))) 3r33263.
3r3163. 3r3164. Learn more about hostname and TLS certificate authentication [/b] 3r3r1616. Parameter 3r3176. hostname in this case, the Common Name (CN) or Subject Alt Name (SAN) of the certificate. That is, the domain name for which the certificate is issued. It verifies the authenticity of the server certificate.
Here are the SAN values for the certificate that is used when connecting to ???.8:853 3r-3255.
3r3176. dns.google
8888.google
???.4 3-333263. ???.8 3-333263. 2001: 4860: 4860: 0: 0: 0: 0: 64
2001: 4860: 4860: 0: 0: 0: 0: 6464
2001: 4860: 4860: 0: 0: 0: 0: 8844
2001: 4860: 4860: 0: 0: 0: 0: 8888
Any of these values can be used as the hostname parameter. If you deploy your own public recursive resolver, you will hardly be able to issue an X.509 certificate to an IP address, so you will have to specify a domain name in the hostname parameter.
Running the demon
sudo brew services start knot-resolver
You can check if the daemon started successfully with the command: 3r33232.
sudo lsof -i -P -n | grep kresd
The kresd process should listen on port 53 on localhost.
If something went wrong, we look at the error log:
cat /usr/local/var/log/kresd.log
Check the work resolver
dig @ ???.1 habr.com
Check that the local resolver responds correctly.
Installation as a system resolver
If everything works correctly, you can assign a system resolver in the properties of the network adapter:

It may be interesting
weber
Author25-10-2018, 02:25
Publication DateDevelopment / Programming
Category- Comments: 0
- Views: 481