A simple DNS proxy server
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd/nasello
.gitignore
.travis.yml
Gopkg.lock
Gopkg.toml
LICENSE
README.md
config.go
go.mod
go.modverify
nasello.1
sample_config.json
server.go

README.md

nasello

A very simple DNS proxy server capable of routing client queries to different remote servers based on pattern matching.

This software relies heavily on miekg's excellent DNS library.

Warning: this is alpha software and should be used with caution.

Getting Started

Getting nasello

The latest release is available at Github

Installing from source

You can install nasello with the standard go get:

go install github.com/piger/nasello/cmd/nasello

This command will install a copy of nasello inside $GOPATH/bin/.

Configuration format

The configuration file is a JSON document which must contains a filters list with one or more pattern dictionaries; each filter must contain a FQDN DNS name as the pattern and a list of one or more remote DNS servers to forward the query to. For reverse lookups the in-addr.arpa domain must be used in the pattern definition.

To use DNS-over-HTTPS see the example below.

The "." pattern specifies a default remote resolver.

Example

The following configuration example specifies three filters:

  • *.example.com will be resolved by OpenDNS (208.67.222.222, etc.)
  • 10.0.24.* will also be resolved by OpenDNS
  • all the other queries will be forwarded to Google DNS (8.8.8.8, etc.)

nasello.json:

{
  "filters": [
    {
      "pattern": "example.com.",
      "addresses": [ "208.67.222.222", "208.67.220.220" ]
    },
    {
      "pattern": "25.1.10.in-addr.arpa.",
      "addresses": [ "10.1.25.1", "10.1.25.2" ]
    },
    {
      "pattern": "google.com.",
      "addresses": [ "8.8.8.8", "8.8.4.4" ]
    },
    {
      "pattern": ".",
      "addresses": [ "1.1.1.1:853" ],
      "protocol": "tcp-tls"
    }
  ]
}

License

nasello is under the MIT license. See the LICENSE file for details.