That DNS

Project Details

  1. Introduction
  2. Purpose
  3. How it works?

Introduction

The basic idea of this project (or a PoC) is to create a Name Server that responds to the queries from Global DNS servers like Cloudflare (1.1.1.1) or Google (8.8.8.8) with respecting the geography of the IP Address it is requested from.

It does look difficult from the perspective of normal website user, but if you think about it from a engineering perspective it is quite simple.

Purpose

The main purpose of this project is to have a Name server that sits in-between DNS and records. Based on the location it will resolve A/AAAA records closest to the Client IP that requested the record.

e.g. if client is in India and the website they visit is resolving to multiple IPs around the globe thatdns service will respond with only nearest ones.

How it works?

The server is running CoreDNS service that responds to all the queries from DNS Servers. Following are the plugins that are going to be used.

File Plugin

The simple file has records which needs records to be served. More details about it are available in Core DNS Plugin file

GeoIP Plugin

The GeoIP plugin allows adding a metadata about the Client Address, like Country, City, etc. More details about it are available in Core DNS Plugin geoip

GeoDNS Plugin (In progress)

This plugin is in development, it actually does the magic. It is a middleware which filters the IPs which are nearby to the Client IP. Code repository is available at GeoDNS Git Repository.

More details...