Skip to content

Instantly share code, notes, and snippets.

@Nathanwoodburn
Created March 28, 2024 09:57
Show Gist options
  • Save Nathanwoodburn/96259d429936ec260c033091ece68cf4 to your computer and use it in GitHub Desktop.
Save Nathanwoodburn/96259d429936ec260c033091ece68cf4 to your computer and use it in GitHub Desktop.
dnsdist.conf
newServer({address="139.144.68.241", name="HNSDNS 1"})
newServer({address="139.144.68.242", name="HNSDNS 2"})
setLocal('0.0.0.0:53')
addDOHLocal('0.0.0.0', '/etc/letsencrypt/live/hnsdoh.com/fullchain.pem', '/etc/letsencrypt/live/hnsdoh.com/privkey.pem', {"/", "/dns-query"}, { reusePort=true,maxInFlight=10})
addTLSLocal('0.0.0.0', '/etc/letsencrypt/live/hnsdoh.com/fullchain.pem', '/etc/letsencrypt/live/hnsdoh.com/privkey.pem',{ reusePort=true,maxInFlight=10})
addACL('0.0.0.0/0')
map = { newDOHResponseMapEntry("^/$", 307, "https://welcome.hnsdoh.com") }
dohFE = getDOHFrontend(0)
dohFE:setResponsesMap(map)
setKey("csl2icaGACsP3+M9tx55c8+dBxVCnlnqAHEC92P55eo=")
controlSocket('127.0.0.1:5199')
setVerbose(true)
@Nathanwoodburn
Copy link
Author

Nathanwoodburn commented Mar 28, 2024

DoT log after sending a request kdig @<domain> +tls <request>

Mar 28 09:58:39 hnsdoh-sg dnsdist[11456]: Got TCP connection from 203.214.34.118:39431
Mar 28 09:58:40 hnsdoh-sg dnsdist[11456]: Got query for woodburn.nostr|A from 203.214.34.118:39431 (DoT, 130 bytes), relayed to HNSDNS 1 (139.144.68.241:53)
Mar 28 09:58:40 hnsdoh-sg dnsdist[11456]: Got an exception while handling (writing to backend) TCP query from 203.214.34.118:39431: Error while writing message: Connection refused
Mar 28 09:58:40 hnsdoh-sg dnsdist[11456]: Got an exception while handling (writing to backend) TCP query from 203.214.34.118:39431: Error while writing message: Connection refused
Mar 28 09:58:40 hnsdoh-sg dnsdist[11456]: Got an exception while handling (writing to backend) TCP query from 203.214.34.118:39431: Error while writing message: Connection refused
Mar 28 09:58:40 hnsdoh-sg dnsdist[11456]: Got an exception while handling (writing to backend) TCP query from 203.214.34.118:39431: Error while writing message: Connection refused
Mar 28 09:58:41 hnsdoh-sg dnsdist[11456]: Got an exception while handling (writing to backend) TCP query from 203.214.34.118:39431: Error while writing message: Connection refused

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment