How to enable TCP for DNS resolution?

5,639

Solution 1

As far as I can tell this is not possible. In OpenBSD you could add options tcp to /etc/resolv.conf to get what you want, at least presumably, but that option doesn't exist in Linux.

You can't configure BIND to do this either. See this thread where Paul Vixie himself implies that this would be a really bad idea anyway: http://groups.google.com/group/comp.protocols.dns.bind/browse_thread/thread/2272f6c39dcfe364

Solution 2

You are most likely using the BIND name server, which operates on TCP and UDP by default. All you need to do is allow traffic on TCP port 53 to reach your server.

Share:
5,639

Related videos on Youtube

Bala
Author by

Bala

Updated on September 18, 2022

Comments

  • Bala
    Bala almost 2 years

    I've been doing some reading about this, according to what I understood this is possible, but HOW??,

    I know UDP is much much better for DNS resolution but because of so many issues an restrictions, I need to use TCP instead, is this really possible and how can I do it?

    I'm running Centos 5.5 and all I want is that ANY DNS query uses TCP instead of udp.

    Thanks!

    • voretaq7
      voretaq7 about 13 years
      What restrictions are you trying to bypass? Many firewalls still only allow UDP DNS requests (port 53)...
    • diyism
      diyism almost 12 years
      I know to modify DnsApi.dll to enable TCP only dns resolving. Does anyone know the solution for linux?
  • diyism
    diyism over 11 years
    Maybe we should found someone to modify glibc libresolv.so file just like OpenBSD