Giter Site home page Giter Site logo

dns's Introduction

DNS Server & Resolver

This project is a DNS server and resolver implemented in the Go programming language. It provides the functionality to act as a DNS server, receiving DNS queries and responding with the appropriate DNS records. Additionally, it can function as a DNS resolver, allowing users to query external DNS servers for DNS records.

ezgif com-gif-maker

Features

  • DNS server: Accepts incoming DNS queries and responds with the appropriate DNS records.
  • DNS resolver: Sends DNS queries to external DNS servers and receives the corresponding DNS records.

Prerequisites

To use this project, you need to have the following installed:

  • Go (version 1.19)
  • Git

Getting Started

Follow the steps below to get started with the DNS server and resolver:

  1. Clone the repository using Git:

    git clone https://github.com/Manthan109/dns.git
  2. Change to the project directory:

    cd dns
  3. Run the project:

    go run cmd/dns-resolver/main.go

Usage

Open a new tab in the terminal and type

dig @127.0.0.1 <url>

example

dig @127.0.0.1 google.com

Project Notes

This is a simple DNS server and resolver that works only on UDP for now and IPv4 addresses (TypeA records). All the other missed out features like caching have been done intentionally to reduce the scope of the project.

DNS Working

Untitled-2023-06-05-2230

Logical Flow

logical-flow

References

  1. https://amriunix.com/post/deep-dive-into-dns-messages/
  2. https://www.ques10.com/p/10908/explain-dns-message-format-with-neat-diagram-1/
  3. https://medium.com/@openmohan/dns-basics-and-building-simple-dns-server-in-go-6cb8e1cfe461
  4. https://github.com/wardviaene/golang-for-devops-course

dns's People

Contributors

manthanguptaa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.