Skip to content

A pure shell to download, validate, and configure upstream DNS servers for dnsproxy, AdGuardHome.

License

fernvenue/dns-upstream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DNS Upstream

dns-upstream dns-upstream

A pure shell to download, validate, and configure upstream DNS servers for dnsproxy, AdGuardHome.

Features

  • Download and validate upstream DNS configuration files;
  • Support multiple DNS server formats (IPv4, IPv6, UDP, TCP, TLS, HTTPS, HTTP/3, QUIC, SDNS);
  • Domain-specific DNS server configuration with [/domain/]dns syntax;
  • Custom DNS server replacement for domain-specific entries;
  • Multiple upstream source support (command line, environment variables, local files);
  • Configurable logging levels (debug, info, warn, error);
  • Systemd service integration with automatic restart capability;
  • Built-in validation for all DNS server configurations;
  • Flexible output file configuration for AdGuardHome integration.
  • Telegram notification support.

Usage

Download script:

curl -o /usr/local/bin/dns-upstream.sh https://raw.githubusercontent.com/fernvenue/dns-upstream/master/dns-upstream.sh

Give execute permissions:

chmod +x /usr/local/bin/dns-upstream.sh

Download systemd service and timer templates:

curl -o /etc/systemd/system/dns-upstream.service https://raw.githubusercontent.com/fernvenue/dns-upstream/master/dns-upstream.service
curl -o /etc/systemd/system/dns-upstream.timer https://raw.githubusercontent.com/fernvenue/dns-upstream/master/dns-upstream.timer

Customize the service and timer files if needed, then enable and start the timer:

systemctl enable dns-upstream.timer --now
systemctl status dns-upstream.timer

Links

About

A pure shell to download, validate, and configure upstream DNS servers for dnsproxy, AdGuardHome.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages