All Projects → mwarning → Simpledns

mwarning / Simpledns

Licence: cc0-1.0
A very simple and small DNS Server to help understanding the protocol basics.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Simpledns

dnsfwd
DNS forwarder over a (TCP) virtual circuit
Stars: ✭ 21 (-66.13%)
Mutual labels:  dns, dns-server
Gdnsd
Authoritative DNS Server --
Stars: ✭ 370 (+496.77%)
Mutual labels:  dns, dns-server
MicroDNSSrv
A micro DNS server for MicroPython to simply respond to A queries on multi-domains with or without wildcards (used on Pycom modules & ESP32)
Stars: ✭ 43 (-30.65%)
Mutual labels:  dns, dns-server
Windows.10.DNS.Block.List
Windows DNS Block List
Stars: ✭ 18 (-70.97%)
Mutual labels:  dns, dns-server
Blocky
Fast and lightweight DNS proxy as ad-blocker for local network with many features
Stars: ✭ 523 (+743.55%)
Mutual labels:  dns, dns-server
Secure-Adblocking-DNS
Secure (DNS-over-TLS) Adblocking (Pi-hole) Recursive (unbound) Server System setup
Stars: ✭ 19 (-69.35%)
Mutual labels:  dns, dns-server
Smartdns
A local DNS server to obtain the fastest website IP for the best Internet experience, 一个本地DNS服务器,获取最快的网站IP,获得最佳上网体验。
Stars: ✭ 4,333 (+6888.71%)
Mutual labels:  dns, dns-server
unbound-dns-firewall
DNS-Firewall Python script for UNBOUND
Stars: ✭ 23 (-62.9%)
Mutual labels:  dns, dns-server
Dns Proxy Server
Solve your DNS hosts from your docker containers, then from your local configuration, then from internet
Stars: ✭ 480 (+674.19%)
Mutual labels:  dns, dns-server
Shaman
Small, lightweight, api-driven dns server.
Stars: ✭ 426 (+587.1%)
Mutual labels:  dns, dns-server
Alfis
Alternative Free Identity System
Stars: ✭ 162 (+161.29%)
Mutual labels:  dns, dns-server
Dnsserver
Technitium DNS Server
Stars: ✭ 603 (+872.58%)
Mutual labels:  dns, dns-server
AmpliSpy
Check local or remote list of DNS servers for suitability in DNS Amplification DoS.
Stars: ✭ 39 (-37.1%)
Mutual labels:  dns, dns-server
zonemanager
Central DNS/DHCP database with replication to Amazon Route53, BIND, MikroTik routers and other services.
Stars: ✭ 29 (-53.23%)
Mutual labels:  dns, dns-server
newdns
A library for building custom DNS servers in Go.
Stars: ✭ 40 (-35.48%)
Mutual labels:  dns, dns-server
Roguesploit
Powerfull Wi-Fi trap!
Stars: ✭ 262 (+322.58%)
Mutual labels:  dns, dns-server
afdns
Ad free DNS server. A docker container with a DNS server configured to block advertisement hosts.
Stars: ✭ 27 (-56.45%)
Mutual labels:  dns, dns-server
xip.name
Simple wildcard DNS inspired by xip.io
Stars: ✭ 143 (+130.65%)
Mutual labels:  dns, dns-server
Dnsclient.net
DnsClient.NET is a simple yet very powerful and high performant open source library for the .NET Framework to do DNS lookups
Stars: ✭ 400 (+545.16%)
Mutual labels:  dns, dns-server
Whonow
A "malicious" DNS server for executing DNS Rebinding attacks on the fly (public instance running on rebind.network:53)
Stars: ✭ 533 (+759.68%)
Mutual labels:  dns, dns-server

Introduction

SimpleDNS is a very simple DNS server. It was made to learn the basics of the DNS protocol.

Features:

  • very small
  • single-threaded
  • all necessary data structures for further features
  • very simplistic memory management
  • supports A, AAAA and TXT queries
  • no full protection against malformed requests :|

Build

git clone https://github.com/mwarning/SimpleDNS.git
cd SimpleDNS
make

Test

Start SimpleDNS:

$./main
Listening on port 9000.

In another console execute dig to make a DNS request:

$ dig @127.0.0.1 -p 9000 foo.bar.com A

; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> @127.0.0.1 -p 9000 foo.bar.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 15287
;; flags: qr; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;foo.bar.com.                   IN      A

;; ANSWER SECTION:
foo.bar.com.            0       IN      A       192.168.1.1

;; Query time: 0 msec
;; SERVER: 127.0.0.1#9000(127.0.0.1)
;; WHEN: Mon Apr 15 00:50:38 2013
;; MSG SIZE  rcvd: 56

Note:

  • On Debian Linux, dig is part of the dnsutils package.
  • Use AAAA instead of A in the dig command line to request the IPv6 address.

Modify address entries

The code maps the domain "foo.bar.com" to the IPv4 address 192.168.1.1 and IPv6 address fe80::1. It is easy to find it in the code and to add other entries.

Recommended Reading

The DNS section of the TCP/IP-Guide was very helpful for understanding the protocol.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].