Re: Protocols.DNS.server anyone used it in a DNS server?

2018-02-08 Thread Stephen R. van den Berg
Tobias S. Josefowitz wrote:
>> Is the code available?

>I could give you access to a private github repo with a general
>purpose authoritative nameserver implementation, never fully got
>around to getting it into releasable state though. It does things like
>this:

Sounds good.
I was considering creating something like this, with a (obviously)
PostgreSQL backend.

If I could have a look, I might be willing to push it into something
releasable.
-- 
Stephen.


Re: Protocols.DNS.server anyone used it in a DNS server?

2018-02-07 Thread Tobias S. Josefowitz
On Thu, Feb 8, 2018 at 2:04 AM, Stephen R. van den Berg  wrote:
> Has anyone ever used Protocols.DNS.server in an application
> (to implement a mini-DNS server)?

Yes. I've myself used it in many applications and seen it used in some more.

> Is the code available?

I could give you access to a private github repo with a general
purpose authoritative nameserver implementation, never fully got
around to getting it into releasable state though. It does things like
this:

object zone = DS.Zone("syncdb.org",
DS.Record.SOA("", "ns2.kiwihaven.com", "tobij.tobij.de", 2015111500, 3600),
DS.Record.NS("", "ns1.kiwihaven.com"),
DS.Record.NS("", "ns2.kiwihaven.com"),
DS.Record.NS("", "ns4.kiwihaven.com"),
DS.Record.A("", "127.0.0.1"),
DS.Record.MX("", 10, "hi.tobij.de"),
DS.Record.A("ns1", "209.239.120.27"),
DS.Record.A("ns2", "210.48.10.69"),
DS.Record.A("ns3", "178.63.103.12"),
DS.Record.A("www", "127.0.0.127"),
DS.Record.Geo("geo", ([ "SE" : DS.Record.A("geo", "209.239.120.27"),
"NO" : DS.Record.A("geo", "209.239.120.27"),
"_" : DS.Record.A("geo", "188.40.42.213") ]), ipdb)
);

Tobi


Re: Protocols.DNS.server anyone used it in a DNS server?

2018-02-07 Thread Chris Angelico
On Thu, Feb 8, 2018 at 12:04 PM, Stephen R. van den Berg  wrote:
> Has anyone ever used Protocols.DNS.server in an application
> (to implement a mini-DNS server)?
> Is the code available?

Yep! Here's one that shares your /etc/hosts.

https://github.com/Rosuav/Hogan/blob/master/sharehosts.pike

It's built on top of an async I/O framework that I call "Hogan":

https://github.com/Rosuav/Hogan/blob/master/hogan.pike

That script is currently in use on my LAN as a means of tracking some
cool stats and things about DHCP and DNS.

ChrisA