GithubHelp home page GithubHelp logo

ztdns's People

Contributors

aarynsmith avatar erictendian avatar jskswamy avatar laurentfough avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ztdns's Issues

Running `go get` on OSX 10.13.6 (17G65) throws "undefined: strings.Builder" and other exceptions

$> go get -u github.com/uxbh/ztdns/
# github.com/miekg/dns
../../go/src/github.com/miekg/dns/msg_helpers.go:144: base32.HexEncoding.WithPadding undefined (type *base32.Encoding has no field or method WithPadding)
../../go/src/github.com/miekg/dns/msg_helpers.go:144: undefined: base32.NoPadding
../../go/src/github.com/miekg/dns/msg_helpers.go:270: undefined: strings.Builder
../../go/src/github.com/miekg/dns/serve_mux.go:43: undefined: strings.Builder
../../go/src/github.com/miekg/dns/types.go:422: undefined: strings.Builder
../../go/src/github.com/miekg/dns/types.go:446: undefined: strings.Builder
../../go/src/github.com/miekg/dns/types.go:474: undefined: strings.Builder
../../go/src/github.com/miekg/dns/types.go:495: undefined: strings.Builder
../../go/src/github.com/miekg/dns/types.go:505: undefined: strings.Builder
../../go/src/github.com/miekg/dns/types.go:517: undefined: strings.Builder
../../go/src/github.com/miekg/dns/types.go:474: too many errors

API URL supplied in .ztdns.toml doesn't seem to work

The default URL in .ztdns.toml gives a 404 error. I searched a bit in the ZeroTier documentation and I think that the API is/can be http://127.0.0.1:9993, however when trying that, I just get a 401 Unauthorized response. Perhaps I'm wrong and there are two separate APIs that I'm conflating, but if that's the case, I'm not sure what to use that won't throw a 404.

This is using go1.10.2 on a Raspberry Pi 3 Model B running Raspbian 9.4 with ZeroTier 1.2.8. I do not seem to be having the same issue as reported in #9

Unable to bind to port 53 for udp6

Hi,

I keep getting:
FATA[0002] failed to start DNS server: listen udp6 [ee20::5cde:21ff:fe18:ca2c]:53: bind: invalid argument

whenever I try to start the DNS server.

Config file option does not work

Using the --config option does not seem to work.
MWE:

ztdns --config /etc/.ztdns.toml server
Error: no API key provided
Usage:
  ztdns server [flags]
Flags:
  -h, --help               help for server
      --interface string   interface to listen on
Global Flags:
      --config string   config file (default is $HOME/.ztdns.toml)
      --debug           enable debug messages
no API key provided

Running the program with strace indicates that it only looks in the default locations

getcwd("/home/user", 4096)              = 11
newfstatat(AT_FDCWD, "/home/user/.ztdns.json", 0xc0000adca8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/user/.ztdns.toml", 0xc0000add78, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/user/.ztdns.yaml", 0xc0000ade48, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/user/.ztdns.yml", 0xc0000adf18, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/user/.ztdns.properties", 0xc00013e038, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/user/.ztdns.props", 0xc00013e108, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/user/.ztdns.prop", 0xc00013e1d8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/user/.ztdns.hcl", 0xc00013e2a8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/user/.ztdns.dotenv", 0xc00013e378, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/user/.ztdns.env", 0xc00013e448, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/user/.ztdns.ini", 0xc00013e518, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/user/.ztdns", 0xc00013e5e8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/root/.ztdns.json", 0xc00013e6b8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/root/.ztdns.toml", 0xc00013e788, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/root/.ztdns.yaml", 0xc00013e858, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/root/.ztdns.yml", 0xc00013e928, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/root/.ztdns.properties", 0xc00013e9f8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/root/.ztdns.props", 0xc00013eac8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/root/.ztdns.prop", 0xc00013eb98, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/root/.ztdns.hcl", 0xc00013ec68, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/root/.ztdns.dotenv", 0xc00013ed38, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/root/.ztdns.env", 0xc00013ee08, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/root/.ztdns.ini", 0xc00013eed8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/root/.ztdns", 0xc00013efa8, 0) = -1 ENOENT (No such file or directory)
write(2, "Error: no API key provided\n", 27Error: no API key provided
) = 27

Docker-Compose - Can't find interfaces

Error: fatal msg="Could not get interface: route ip+net: no such network interface\n"
interface = "zt7nnjn3xu" list in .ztdns.toml in the root directory of the git repo

I can start the service using the pre-compiled executable with the same config file and have no problems.

Running this on CentOS 7 as root.

Error

go get -u github.com/uxbh/ztdns/

github.com/miekg/dns

Go/src/github.com/miekg/dns/msg_helpers.go:144: base32.HexEncoding.WithPadding undefined (type *base32.Encoding has no field or method WithPadding)
Go/src/github.com/miekg/dns/msg_helpers.go:144: undefined: base32.NoPadding

Feature: Support for multiple network IDs

I am on multiple ZeroTier networks where some hosts also share multiple networks with each other. I'd rather not run multiple DNS servers per network ID, but instead have a single server being able to provide DNS answers for a comma-separated list of network IDs.

Here's how I currently have this implemented: https://github.com/uxbh/ztdns/compare/master...EricTendian:multiple-network-ids?expand=1

Right now this is a breaking change as the hostname would change from member.zt to member.networkname.zt, so I'm making this issue to ask for feedback about 1) if this feature would be valuable to others, and 2) how to deal with the breaking change. Perhaps only add the .networkname if more than one ID is specified?

Unable to update DNS entries: Unable to get network info

Hi,
I just installed ztdns on raspberrypi, filled the .ztdns.toml file, and run ./ztdns server. But it gave me this error :

FATA[0001] Unable to update DNS entries: Unable to get network info: json: cannot unmarshal number 1521624552143 into Go struct field Network.Clock of type int

I use go version go1.10 linux/arm (armv6), with raspbian 9 (stretch).
zerotier-cli tells me everything is ok, I authorized the device on my network.
ifconfig show me same address as in my.zerotier.com
I authorized users to bind privileged port.

What am I missing ? :(

openwrt version

it would be great if you can compile it for openwrt, there is no similar package for openwrt routers and this is highly in demand.

Dns name

I have download ztdns, ths is nice but If I look for an host address I have to query for
.zt.domain.zt
Reverse Resolution will also be nice.

Unable to pull member list and dns entries

Unable to update DNS entries: Unable to get member list: json: cannot unmarshal array into Go struct field .Config.Tags of type string

# Configuration file for ztDNS

suffix = "zt"
port = 53
interface = "ztyou4q"

# Number of minutes to wait before updating the DNS database again (Default: 30)
DBRefresh = 30

# This section contains information related to your ZeroTier config
[ZT]
# API is used to contact the ZeroTier controller API service.
API = "hQFtY3uX0UH9TGqWabcdefghi"
# URL is the url of the ZeroTier controller API
URL = "https://my.zerotier.com/api"

# This section contains one or more ZeroTier networks
# Format is: domain = "NetworkID"
# Domain does not have to match the configured network name
[Networks]
domain = "networkid3646546"

CoreDNS

This would be interesting to ship as a CoreDNS plugin, which itself is reasonably easy to deploy and operate.

it would be fantastic to be able to delegate a zone to such plugin something arorund this pseuydoconfig:

domain.zt {
  # Automatically load zone files mounted in the "zones" directory
  ztdns {
    zt_api_token
  }
}

Not working on Windows?

Got it running and configured on Windows but the DNS server doesn't seem to be reachable. It picks up the computers in my network correctly and starts the server on port 53 but I'm unable to telnet to it or use it at all. I've allowed it through Windows Firewall, too, so that's not stopping it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.