As you can see here (and in man resolv.conf
), there is an option named use-vc
for resolv.conf
to force Ubuntu to use TCP for DNS queries instead of UDP.
use-vc (since glibc 2.14)
Sets RES_USEVC in _res.options. This option forces the use of TCP for DNS resolutions.
This option doesn't work for me.
My Ubuntu:
ebrahim@ebrahim:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.10
Release: 16.10
Codename: yakkety
ebrahim@ebrahim:~$ uname -a
Linux ebrahim 4.8.0-58-generic #63-Ubuntu SMP Mon Jun 26 17:08:21 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
ebrahim@ebrahim:~$ ldd --version
ldd (Ubuntu GLIBC 2.24-3ubuntu2.2) 2.24
As you see above, my glibc
is newer version than the required version in the resolv.conf manual page.
This is my configuration file:
ebrahim@ebrahim:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
options use-vc
nameserver 8.8.8.8
But still DNS queries are on UDP:
Why?
(Note that I have tried this option on 6 different Ubuntu OS, 3 of them was okay and 3 doesn't worked!)
0 Answers