Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Tiny dnstap-to-webserver daemon

License

NotificationsYou must be signed in to change notification settings

CHTJonas/whoami-dns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

whoami-dns is a clever webserver that runs the backend forhttps://debug.charliejonas.co.uk/dns.html. It's designed to work in tandem with an authoritative DNS server usingdnstap and wildcard domains so that clients' recursive DNS servers can be identified by the source IP addresses of their queries.

Principle

  1. A zonefile contains a* 1 A 192.0.2.1 wildcard record where 192.0.2.1 is the public IP address of the host.
  2. The name server that is authoritative for that zone is configured to use dnstap via a UNIX socket.
  3. whoami-dns listens on that socket and detects incoming DNS queries.
  4. The source IP address and domain of the query are parsed and stored by whoami-dns.
  5. whoami-dns listens for incoming HTTP requests and uses theHost header to determine the source IP address of the DNS query.
  6. A plaintext HTTP response body is sent by whoami-dns containing the client's recursive resolver's IP address.

Usage

Usage:  whoami-dns [flags]Flags:  -b, --bind string   path to dnstap UNIX socket (default "/var/lib/knot/dnstap.sock")  -h, --help          help for whoami-dns  -p, --port string   port on which to listen for HTTP requests (default "6780")

Installation

Pre-built binaries for a variety of operating systems and architectures are available to download fromGitHub Releases. If you wish to compile from source then you will need a suitableGo toolchain installed. After that just clone the project using Git and run Make! Cross-compilation is easy in Go so by default we build for all targets and place the resulting executables in./bin:

git clone https://github.com/CHTJonas/whoami-dns.gitcd whoami-dnsmake clean&& make all

Copyright

whoami-dns is licensed under theBSD 2-Clause License.

Copyright (c) 2021 Charlie Jonas.


[8]ページ先頭

©2009-2025 Movatter.jp