DEV Community

hardyweb
hardyweb

Posted on • Edited on

1

Local DNS cache server - Smartdns-rs

https://github.com/mokeyish/smartdns-rs

This installation base on Windows OS

https://github.com/mokeyish/smartdns-rs/releases/download/0.7.1/smartdns-x86_64-pc-windows-msvc.zip

extract to C:\Program Files\Smartdns

Open smartdns.conf ( included in zip file ), replace with this setting

# Listen on local port 53
bind 127.0.0.1:53  

# Configure bootstrap-dns, if not configured, call the system_conf, 
# it is recommended to configure, so that it will be encrypted.
server https://1.1.1.1/dns-query  -bootstrap-dns -exclude-default-group
server https://8.8.8.8/dns-query  -bootstrap-dns -exclude-default-group
server-tls 1.12.12.12
server-tls 120.53.53.53
server 119.29.29.29
server-tls dot.pub
server 223.5.5.5
server-https https://doh.pub/dns-query
server-https https://dns.alidns.com/dns-query
server 114.114.114.114
server 1.2.4.8
server 1.1.1.1
server-tcp 1.1.1.1
server-tls 1.1.1.1
server-https https://cloudflare-dns.com/dns-query
server 8.8.8.8
server-tcp 8.8.8.8
server 210.186.147.174


cache-size 32768


force-qtype-SOA 65


conf-file anti-ad.conf
Enter fullscreen mode Exit fullscreen mode

after that, create anti-ad.conf along with smartdns.conf, refer to this

https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-smartdns.conf

this config will block ads like y*be ads.

fireup cmd prompt ( administrator mode )

C:\Program Files\Smartdns\

./smartdns service install

./smartdns service status

then, change dns in ethernet properties to 127.0.0.1

Test with dig tools

install bind
scoop install bind

test dns

Image description

Update:

if you install smartdns-rs on raspberrypi ( tested on raspberry pi 3b using this binary - smartdns-arm-unknown-linux-musleabi.tar.gz
).

once you run smartdns service install, it will copy smartdns binary on /usr/bin/smartdns
also copy smratdns.conf (original template) to /etc/smartdns/smartdns.conf

and lastly, it will copy smartdns-rs.service ( systemctl service ) to /usr/lib/systemd/system/smartdns-rs.service )

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay