Git Product home page Git Product logo

pytinydns's Introduction

PyTinyDNS:

Usage: pytinydns.py [OPTION]...
	-h, --help 		Print this message
	-c, --config=file	Specify the config file to use
	-d, --default=ip	Specify the default IP address to fall back on
	-l, --list=host_file	Specify host file to use instead of redis
	-n, --noredis		Specify not to use redis db. Default IP will be used
	-r, --resolve		Specify to resolve non matches to actual IP


This is a tiny DNS server that resolves A records to IPs.

Sample Host File:
# Comment
google.com.:127.0.0.1
yahoo.com.:192.168.1.1

Sample Config File:
[PyTinyDNS]
DefaultIP = 192.168.1.99
Use_Redis = yes
Redis_Server = localhost
# Resolve_Nonmatch will query your normal DNS for domains with no local match.
# May cause delays in answering other requests. Default is no.
# Resolve_Nonmatch = yes
# Host_File = pytinydns.host


PyTinyDNS redis import tool will import the host file and save the keys and values into the redis db.

If you elect not to use redis, then you can either resolve every domain to the default IP or use a config file to supply A records.

The above host file will resolve google to 127.0.0.1 and yahoo.com to 192.168.1.1 respectively

Added redis_import.py:

Usage: redis_import.py import_file

Can be used to update live instance of the DNS server.

Borrowed DNSQuery class from http://code.activestate.com/recipes/491264-mini-fake-dns-server/

pytinydns's People

Contributors

wcummings avatar mikewaters avatar

Watchers

James Cloos avatar Nate Elliott 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.