Menu

A Local Caching DNS Resolver for Scraping Hosts with Unbound
📰

A Local Caching DNS Resolver for Scraping Hosts with Unbound

DEV Community·IPYE·about 8 hours ago
#hAwZCkgX
#devcommunity#dev#dns#ipye#resolver
Long article (778 words) — no AI summary yet.
Reading 0:00
15s threshold

Disclosure up front: I run IPYE, a company that leases IP space. This is a practical how-to, and IPYE comes up where it helps, with a short call to action at the end.

Scrapers and proxy hosts make huge numbers of DNS lookups, often for the same few thousand hostnames. Sending them all to a public resolver adds latency to every request, can run into the resolver's rate limits, and spreads information about your crawl across third parties. A local Unbound resolver on each host, or one per site, caches answers and validates DNSSEC. It also keeps proxied DNS traffic under your control. This guide sets one up for scraping hosts on a range from IPYE . The examples use the documentation prefix 203.0.113.0/24 , with the resolver listening on 127.0.0.1 and ::1 .

Install and configure

apt install unbound

Enter fullscreen mode

Exit fullscreen mode

/etc/unbound/unbound.conf.d/local.conf :

server : interface : 127.0 . 0.1 interface : :: 1 access - control : 127.0 .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.