Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
    
What restrictions are you trying to bypass? Many firewalls still only allow UDP DNS requests (port 53)... –  voretaq7 May 21 '11 at 20:40
    
I know to modify DnsApi.dll to enable TCP only dns resolving. Does anyone know the solution for linux? –  diyism Sep 15 '12 at 16:03

3 Answers 3

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

share|improve this answer
    
Maybe we should found someone to modify glibc libresolv.so file just like OpenBSD –  diyism Mar 13 '13 at 3:40

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|improve this answer

DNS use UDP for resolving query and TCP for zone transfer, UDP data limit is 512 bytes and above will automatically uses TCP.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.