github github
  • Home
  • Pricing and Signup
  • Training
  • Gist
  • Blog
  • Login

njh / captivednsd

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 1
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Switch Branches (1)
    • master ✓
  • Switch Tags (2)
    • 0.2
    • 0.1
  • Branch List
Sending Request…

captivednsd, the Captive Domain Name Server, returns same authorative response to every query. — Read more

  Cancel

http://www.aelius.com/njh/captivednsd/

  Cancel
  • HTTP
  • Git Read-Only

This URL has Read+Write access

Restored trunk. Gah. 
njh (author)
Sun Oct 19 16:51:01 -0700 2008
commit  cd155082b163cdb0c254
tree    dff93f0d95b21b73697d
parent  8bf548c154e224d75849
captivednsd /
name age
history
message
file COPYING Loading commit data...
file Makefile
file README
file captivednsd.c
file captivednsd.h
README
captivednsd
-----------

captivednsd, the Captive Domain Name Server, returns same authorative response 
to every query. The reponse to 'A' queries and 'PTR' records are passed as 
a parameter on the command line. The code is covered by the GNU license.

I wrote the daemon to direct people to a captive web portal, on a system that 
was not connected to the Internet. This meant that it was not possible to 
resolve the correct IP address for a host and then redirect the query using a 
firewall.

captivednsd is based on the source code of scdns and Busybox's dnsd:

http://www.oao.no/filer/scdns-25.tgz
http://www.busybox.net/cgi-bin/viewcvs.cgi/trunk/busybox/networking/dnsd.c


Usage
-----

captivednsd [options] <ip> <host>
      -t <ttl>   Set the TTL for DNS responses (default 30).
      -p <port>  Port number to listen on (default 53).
      -b <addr>  Bind to an IP address (default 0.0.0.0).


Example
-------

captivednsd 10.0.0.1 portal.local.

All A requests will return IP address 10.0.0.1.
All PTR requests will return portal.local.


Todo
----

- Hard coded support for resolving the IP of localhost
- Support reading static hosts from /etc/hosts
- IPv6 Support
Dedicated Server Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
  • Blog
  • Support
  • Training
  • Job Board
  • Shop
  • Contact
  • API
  • Status
  • © 2010 GitHub Inc. All rights reserved.
  • Terms of Service
  • Privacy
  • Security
  • English
  • Deutsch
  • Français
  • 日本語
  • Português (BR)
  • 中文
  • See all available languages

Your current locale selection: English. Choose another?

  • English
  • Afrikaans
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Hrvatski
  • Indonesia
  • Italiano
  • 日本語
  • Nederlands
  • Norsk
  • Polski
  • Português (BR)
  • Српски
  • Svenska
  • 中文