From d1524657957a48ea9615e7df84ab39a8d36ced3f Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Mon, 8 Jan 2024 01:27:32 +1100 Subject: [PATCH] fix: Add paths to allow redirects --- dnsdist.conf | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dnsdist.conf b/dnsdist.conf index 633145a..d79f6ba 100644 --- a/dnsdist.conf +++ b/dnsdist.conf @@ -3,6 +3,8 @@ newServer({address="194.50.5.27", name="Nathan.Woodburn/ 2"}) newServer({address="194.50.5.28", name="Nathan.Woodburn/ 3"}) newServer({address="139.144.68.241", name="HNSDNS 1"}) newServer({address="139.144.68.242", name="HNSDNS 2"}) + +-- These might not work correctly newServer({address="192.198.87.44:443", tls="openssl", subjectName="hnsns.net", dohPath="/dns-query", validateCertificates=true, name="HNSNS"}) newServer({address="178.128.128.181:443", tls="openssl", subjectName="hs.dnssec.dev", dohPath="/dns-query", validateCertificates=true, name="Impervious"}) @@ -11,16 +13,16 @@ newServer({address="178.128.128.181:443", tls="openssl", subjectName="hs.dnssec. -- newServer({address="2a01:7e01:e002:c300::", name="HNSDNS 3"}) -- newServer({address="2a01:7e01:e002:c300::", name="HNSDNS 4"}) -addDOHLocal('0.0.0.0', '/etc/letsencrypt/live/hnsdoh.com/fullchain.pem', '/etc/letsencrypt/live/hnsdoh.com/privkey.pem') +addDOHLocal('0.0.0.0', '/etc/letsencrypt/live/hnsdoh.com/fullchain.pem', '/etc/letsencrypt/live/hnsdoh.com/privkey.pem', {"/", "/dns-query"}, { reusePort=true }) addTLSLocal('0.0.0.0', '/etc/letsencrypt/live/hnsdoh.com/fullchain.pem', '/etc/letsencrypt/live/hnsdoh.com/privkey.pem') setLocal('0.0.0.0:53') addACL('0.0.0.0/0') --TODO fix this to redirect to welcome page --- map = { newDOHResponseMapEntry("^/$", 307, "https://welcome.hnsdoh.com") } --- dohFE = getDOHFrontend(0) --- dohFE:setResponsesMap(map) +map = { newDOHResponseMapEntry("^/$", 307, "https://welcome.hnsdoh.com") } +dohFE = getDOHFrontend(0) +dohFE:setResponsesMap(map) -- Feel free to change the control socket key setKey("csl2icaGACsP3+M9tx55c8+dBxVCnlnqAHEC92P55eo=")