I understand how to fix DNS leaking in browsers.

My question is, what happens when you use tools like OWASP, nikto, recon-ng or any tool for that matter that can take a URL?

It's obviously going to have to resolve the URL into an IP somehow so it must be using a DNS server. Is there a OS level setting in Kali that would forward all DNS requests to a random DNS server?

1 Answer 1


You can do this yourself. Just edit the /etc/resolv.conf file and add the IPv4 and IPv6 DNS servers. Most modern operating systems cache the requests to limit unnecessary requests, you might want to flush this first. Restarting the network interface will do.

  • Perfect. That's what I was looking for. Something I can add into a liveboot setup script. Commented Aug 30, 2016 at 16:50
  • 1
    @AnthonyRussell Yes indeed. Better yet, these settings work the moment you save the file. Commented Aug 30, 2016 at 16:50
  • While editing resolv.conf should work most of the time, I can think of some situations where it isn't bulletproof (some applications may cache the previous resolv.conf, such as Postfix on chroot, and others may simply bypass it and resolve domains "manually" to a server of their choosing). Though it should not happen on the tools mentioned, if having no external DNS queries is important, it may be a good idea to add a firewall rule to drop all DNS traffic not directed to the intended destination (iptables -I OUTPUT -p udp --dport 53 \! -d DNS.SERVER -j DROP and the same with -p tcp). Commented Aug 30, 2016 at 18:33
  • @ValmikyArquissandas Yes very well. Some services change the resolv themselves, like the Ubuntu's resolvconf does. Commented Aug 30, 2016 at 18:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .