Skip to content

simonaslaurinavicius/DNS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mock DNS Server implemented in Python

Server functionality is limited to SOA, NS, MX, A, * type records.
Server does not support recursion, message compression, also authority and additional record sections of a response are always empty.
For the sake of easier parsing, I used JSON to format zone files for the domain.

Made as a study project for my Computer Networking class at Vilnius University.
Goal of the project was to try to implement some kind of an Application Layer Protocol on your own and get experience reading technical documentation.

Chose DNS as I was interested in how it works "under the hood", lots of fun!

DNS Server Demo

Table of contents

Requirements

Project requires:

  • Python version: 3.7 or newer

Setup

To install Python go to Python Downloads
To install Dig go to Install Dig

Run

Navigate to src folder locally and run:

python3 dns.py

Testing

Assuming you have server up and running, navigate to tests folder locally and run:

For Type A Records

dig @localhost -f a_records.txt

For Type MX Records

dig @localhost -f mx_records.txt

For Type ANY Records

dig @localhost -f any_records.txt

For Type SOA Records

dig @localhost -f soa_records.txt

For Type NS Records

dig @localhost -f ns_records.txt

For NXDOMAIN Status

dig @localhost -f nxdomain.txt

License

This project is licensed under the MIT License - see the LICENSE file for details

References

About

Mock DNS Server implemented in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages