6 ms·
Twisted[1] comes with a DNS server built-in. For non-authorative local DNS caches: twistd dns --recursive --cache For authorative servers, to serve a BIN
by lvh 14y ago
Twisted[1] comes with a DNS server built-in.
For non-authorative local DNS caches:
twistd dns --recursive --cache
For authorative servers, to serve a BIND-style zonefile:
twistd dns --bindzone ZONEFILE
But, of course, that's pretty boring. The fun stuff is when you have a Python source file as your zonefile! See: https://twistedmatrix.com/documents/current/names/howto/names.html https://twistedmatrix.com/documents/current/names/howto/name...
twisted.names (that's the name of the DNS package) is simple enough to use for DNS serving (demonstrated above) and flexible enough to get it to do pretty much whatever you want.