-
Notifications
You must be signed in to change notification settings - Fork 0
SmallDNS
Nick Walker edited this page Nov 10, 2017
·
5 revisions
Super simple DNS implementation where each machine pings the master server with it's hostname and ip address.
The server keeps a locally hosted, file based, DNS map (a JSON serialized python dictionary) which stores the mapping from hostnames to ip addresses.
The client scripts ping the server if they notice a change in ip address (either from reboot or lease renewal).
Features:
- Client scripts can be deployed on multiple agents without any setup
- Server keeps track of any agents that have been added
- Client will only ping the server if a change is noticed
- Server can generate a hosts file that can be merged with
/etc/hosts
Limitations:
- The server needs to have a static ip address that must be configured in the client script
Requirements:
- Python (server)
- Bash, wget (client)
Source code is available here
- Run
dnsServer.py
on the server - Clone repository to robot and edit
pingDNS.sh
replacingserver='localhost'
withserver='nixons-head.csres.utexas.edu'
- Set up cron job to execute
pingDNS.sh
at a reasonable interval (Such as*/5 * * * * /home/bwilab/smallDNS/pingDNS.sh >> /home/bwilab/smallDNS/.pingLog
). Switch toroot
and usecrontab -e
to add this
Log into nixons-head as bwilab. Run sudo ~/smallDNS/dnsServer32
This small DNS was integrated with bwi_dashboard so that the web interface can provide the option to select robots that are tracked by the DNS