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 )

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

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

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

Okay