Skip to content

Latest commit

 

History

History
83 lines (48 loc) · 4.26 KB

zenodotus_server.md

File metadata and controls

83 lines (48 loc) · 4.26 KB

What is it?

zenodotus.repy is a DNS Name server application built in repy which services DNS queries as you might expect, but rather than returning data from the domain name service, it returns information on seattle nodes which it gets from the central advertise server.

Dependencies

At the moment, zenodotus requires a file named zenodotus_advertise.repy for preprocessing. This is our way of encapsulating the way zenodotus gets its data, so that in the future if zenodotus needs to change its data source, we can make this change in a sensible way without major code surgery.

As of 10/25/2010, zenodotus also requires a REPY library dependency called ntp_time.repy. This is used to timestamp debug reports.

Public Methods

zenodotus is not a module, and as a result it has no public methods. zenodotus_advertise has one public method, zenodotus_advertise_do_lookup, which looks up the data associated with a given key in the central advertise database.

How do I use it?

General instructions for use are as follows:

  1. Ensure that you have all necessary dependencies for both repy and zenodotus located in a single directory.

  2. Preprocess zenodotus.repy

  sebass63@ubuntu:~/seattle/seattle_repy$ python repypp.py zenodotus.repy zenodotus_built.repy

Doing this will give you a repy file which you can then run without problems in a node or other location.

  1. Run the resulting file through repy. If you are testing this in a node, you need to provide your GENIPort. Otherwise, any unused port will suffice.
  sebass63@ubuntu:~/seattle/seattle_repy$ python repy.py restrictions.test zenodotus_built.repy -p 63120
  Success.
  zenodotus now running on the local machine:
    Host port = 63120
    Local IP  = 192.168.1.7
  1. That's all! zenodotus will keep track of any strange packets it gets, and anything that causes it to get an error, in a file named "debug.txt". This is meant to be pretty easy reading, and there aren't any programs you need to run to make sense of the debug logs.

NOTE: zenodotus supports the following argument flags at runtime: '-p' : Specifies a hostport to listen for queries on. USAGE: zenodotus.repy -p

'-ip' : Specifies an IP address to listen for queries on.
  USAGE: zenodotus.repy -ip <IP Address>

'-tsp': Specifies a "TimeStamp Port" on which zenodotus can connect to a NTP server.
  USAGE: zenodotus.repy -p <hostport> -tsp <NTP Port>

'-ntp': Same functionality as -tsp, but possibly a less confusing acronym.
  USAGE: zenodotus.repy -p <hostport> -ntp <NTP Port>

It is worth noting that the hostport is obligatory; zenodotus has no way of guessing which port it should be listening on, since it is not a traditional DNS Name server and does not automatically assume that it should use port 53. The -ip flag is purely optional; use it if you'd like zenodotus to operate on a specific network interface.

If no NTP port is specified, zenodotus will attempt to use one port from a built-in range to connect to a NTP server. (Default range is 49000 - 49005)

Debugging

There are no unit tests for zenodotus, due to the presence of main code which will crash when imported by a typical test file. This is being worked on, but in the meantime, NSLookup, Host, and DiG are all excellent testing utilities.

Production Deployment

Zenodotus is deployed on blackbox under the zenodotus account. To start / stop / modify it, log in under zenodotus. Try to run screen -r to reattach to the previously run instance of zenodotus. (If this fails, use screen to start a new instance). To stop the running instance, use CTRL-C to interrupt it.

When running the service, it needs to be run using authbind to allow it to bind to port 53. Try running it under screen using a command like:

  zenodotus@ubuntu:~/Zenodotus$ authbind python repy.py restrictions.test zenodotus_built.repy -p 53
  Success.
  zenodotus now running on the local machine:
    Host port = 53
    Local IP  = 192.168.1.7

To exit screen without terminating the process, use CTRL-A, CTRL-D. It should now be running and have its output and errput listed under screen. If this becomes too chatty, we will redirect these to log files.