Giter Club home page Giter Club logo

router_dns's Introduction

Router_DNS

DNS Routing With PowerDNS (The Poor Man's CDN Solution)

Router_DNS is a solution that makes it possible for you to program how your DNS is handled via PHP scripting. It stages your environment to be ready to dictate DNS based on geographical location. It can be used as a ghetto load balancer, but it's best used for content distribution.

Use Case Scenario

The main use case scenario for this would be a CDN. If your target Audiences are throughout the US and Austrailia, you would setup servers on the east and west coast of the US and a server in Austrailia. With Router_DNS, you can ensure that Austrailian traffic goes to the server down under and you can split traffic between the US.

You can also use the longitude and latitude information to figure out which datacenter is closest for your end user and send them on their way according to that.

Requirements

This script was specifically written on/for Ubuntu 14.04LTS and CentOS/RHEL 7. However you might be able to get away with using it on 12.04LTS and newer versions of Ubuntu and it definitely will not work on older versions of CentOS/RHEL. However... I promise NOTHING.

Quick Setup

Just run this command on your server. It will detect if you're running Ubuntu or CentOS and run the appropriate install script.

wget https://raw.githubusercontent.com/Igknighted/Router_DNS/master/setup.sh && bash setup.sh

There is an example configuration for example.com in these files:

/etc/powerdns/php-zones/example.com.php
/etc/powerdns/php-zones/txt1.example.com.php

Hostnames are housed in their own files in /etc/powerdns/php-zones/. The file example.com.php holds the records for any queries against example.com. The file txt1.example.com.php holds records for txt1.example.com.

Note: After the install, you may want to delete the setup scripts. You can just lazily run rm -rf setup.sh setup_rhel.sh setup_ubuntu.sh

router_dns's People

Contributors

igknighted avatar

Watchers

 avatar  avatar

Forkers

w796933

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.