Back to All CourseworkComputer networks
Course ProjectInteractive Web Demo

DNS Forwarder with Blocking & DoH

A DNS forwarder that intercepts queries, answers NXDOMAIN for blocklisted domains, and forwards legitimate requests via UDP or DNS-over-HTTPS.

My Contribution: I wrote the forwarder in Python, and a companion C variant that parses DNS wire-format by hand.
PythonPythonUDP SocketsScapyDNS-over-HTTPS
Live Browser Simulation

DNS Wire Dissector & Rule Engine

Client-Side Engine
Try this: Query blocklisted domains vs allowed domains and inspect the raw binary response headers.

Loading simulation engine...

Architecture verification: Compliant wire-format parsing with local simulated upstream resolver.

Implementation Highlights

  • Listens on UDP port 53, dissecting 12-byte DNS headers and length-prefixed domain labels.
  • Synthesizes immediate NXDOMAIN packets for deny-list matches without touching upstream resolvers.
  • RFC 8484 compliant base64url DNS-over-HTTPS upstream relay support.
  • Real-time access audit logging with ALLOW/DENY decision records.

Algorithm & System Mechanics

  • Inspects questions in the wire packet; forwards transparently or crafts an authoritative denial response.
  • Encapsulates raw wire bytes into HTTPS payloads for encrypted DoH resolution.