Go to file
Eugene Bujak ba56d6c01d Reorganize config file. 2018-09-19 15:51:44 +03:00
client Add refresh button to querylog page 2018-09-17 17:44:32 +03:00
coredns_plugin Fix many lint warnings found by gometalinter 2018-09-14 18:40:05 +03:00
dnsfilter Merge pull request #23 in DNS/adguard-dns from gometalinter to master 2018-09-17 11:26:17 +03:00
packaging Initial commit 2018-08-30 17:25:33 +03:00
tests Initial commit 2018-08-30 17:25:33 +03:00
.gitignore Initial commit 2018-08-30 17:25:33 +03:00
.travis.yml travis -- Fix go test failure. 2018-09-10 15:57:47 +03:00
LICENSE.txt Initial commit 2018-08-30 17:25:33 +03:00
Makefile Makefile -- Fix cross-compilation 2018-09-10 17:46:42 +03:00
README.md Update README to explain config file settings 2018-09-19 15:51:28 +03:00
app.go Implement simple basic auth. 2018-09-18 20:59:41 +03:00
config.go Reorganize config file. 2018-09-19 15:51:44 +03:00
control.go Implement simple basic auth. 2018-09-18 20:59:41 +03:00
helpers.go Implement simple basic auth. 2018-09-18 20:59:41 +03:00
issue_template.md Initial commit 2018-08-30 17:25:33 +03:00
openapi.yaml Initial commit 2018-08-30 17:25:33 +03:00
stats.go Fix many lint warnings found by gometalinter 2018-09-14 18:40:05 +03:00

README.md

Build Status

Self-hosted AdGuard DNS

AdGuard DNS is an ad-filtering DNS server with built-in phishing protection and optional family-friendly protection.

This repository describes how to set up and run your self-hosted instance of AdGuard DNS -- it comes with a web dashboard that can be accessed from browser to control the DNS server and change its settings, it also allows you to add your filters in both AdGuard and hosts format.

If this seems too complicated, you can always use AdGuard DNS servers that provide same functionality — https://adguard.com/en/adguard-dns/overview.html

Installation

Go to https://github.com/AdguardTeam/AdguardDNS/releases and download the binaries for your platform:

Mac

Download file AdguardDNS_*_darwin_amd64.tar.gz, then unpack it and follow how to run instructions below.

Linux

Download file AdguardDNS_*_linux_amd64.tar.gz, then unpack it and follow how to run instructions below.

How to build your own

Prerequisites

You will need:

You can either install it from these websites or use brew.sh if you're on Mac:

brew install go node yarn

Building

Open Terminal and execute these commands:

git clone https://github.com/AdguardTeam/AdguardDNS
cd AdguardDNS
make

How to run

DNS works on port 53, which requires superuser privileges. Therefore, you need to run it with sudo:

sudo ./AdguardDNS

Now open the browser and point it to http://localhost:3000/ to control AdGuard DNS server.

Running without superuser

You can run it without superuser privileges, but you need to instruct it to use other port rather than 53. You can do that by opening AdguardDNS.yaml and adding this line:

coredns:
  port: 53535

If the file does not exist, create it and put these two lines down.

Additional configuration

Open first execution, a file AdguardDNS.yaml will be created, with default values written in it. You can modify the file while AdGuard DNS is not running, otherwise any changes to the file will be lost because they will be overwritten by the server.

Explanation of settings:

  • bind_host -- Web interface IP address to listen on
  • bind_port -- Web interface IP port to listen on
  • auth_name -- Web interface optional authorization username
  • auth_pass -- Web interface optional authorization password
  • coredns -- CoreDNS configuration section
    • port -- DNS server port to listen on
    • filtering_enabled -- Filtering of DNS requests based on filter lists
    • safebrowsing_enabled -- Filtering of DNS requests based on safebrowsing
    • safesearch_enabled -- Enforcing safe search when accessing search engines
    • parental_enabled -- Filtering of DNS requests based on parental safety
    • parental_sensitivity -- Age group for filtering based on parental safety
    • querylog_enabled -- Query logging, also used to calculate top 50 clients, blocked domains and requested domains for stats
    • upstream_dns -- List of upstream DNS servers
  • filters -- List of filters, each filter has these values:
    • url -- URL pointing to the filter contents
    • enabled -- Enable/disable current filter
  • user_rules -- User-defined filtering rules

Removing an entry from settings file will reset it to default value. Deleting the file will reset all settings to default values.

Contributing

You are welcome to fork this repository, make your changes and submit a pull request — https://github.com/AdguardTeam/AdguardDNS/pulls

Reporting issues

If you come across any problem, or have a suggestion, head to this page and click on the New issue button.