DEV Community

Roy
Roy

Posted on

Answer: Set specific DNS server using dns.resolver (pythondns)

You don't specify in your question, but assuming you're using the resolver from dnspython.org, the documentation indicates you want to set the nameservers attribute on the Resolver object.

Though it may be easier to provide an /etc/resolv.conf-style file to pass to the constructor's filename argument.

Top comments (0)