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)

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay