Skip to content

Commit

Permalink
Update dnsdist.conf.j2
Browse files Browse the repository at this point in the history
  • Loading branch information
awlx authored Mar 14, 2024
1 parent 2f2189b commit 7c7bdbf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dnsdist/dnsdist.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ addLocal("0.0.0.0", {reusePort=true})
addLocal("0.0.0.0", {reusePort=true})
addLocal("0.0.0.0", {reusePort=true})
addLocal("0.0.0.0", {reusePort=true})
addLocal("0.0.0.0", {reusePort=true})
addLocal("0.0.0.0", {reusePort=true})
addLocal("::", {reusePort=true})
addLocal("::", {reusePort=true})

Expand All @@ -31,6 +33,8 @@ addTLSLocal("[::]", ssl_cert, ssl_key, { reusePort=true, tcpFastOpenQueueSize=20

-- listen for DoH on localhost for reverse proxy
addDOHLocal("127.0.0.1:445", nil, nil, "/dns-query", { reusePort=true, trustForwardedForHeader=true })
addDOHLocal("127.0.0.1:445", nil, nil, "/dns-query", { reusePort=true, trustForwardedForHeader=true })
addDOHLocal("[::1]:445", nil, nil, "/dns-query", { reusePort=true, trustForwardedForHeader=true })
addDOHLocal("[::1]:445", nil, nil, "/dns-query", { reusePort=true, trustForwardedForHeader=true })

if not file_exists("/var/lib/dnsdist/providerPrivate.key") then
Expand Down Expand Up @@ -131,7 +135,7 @@ setKey("{{ dnsdist_console["key"] }}")
{%- endif %}

setMaxUDPOutstanding(65535)
setMaxTCPClientThreads(20) -- set X(int) to handle number of maximum tcp clients
setMaxTCPClientThreads(50) -- set X(int) to handle number of maximum tcp clients
setMaxTCPConnectionDuration(120) -- set X(int) for tcp connection duaration from a connected client. X is number of seconds.
setMaxTCPConnectionsPerClient(200) -- set X(int) for number of tcp connections from a single client. Useful for rate limiting the concurrent connections.
setMaxTCPQueriesPerConnection(3000) -- set X(int) , similiar to addAction(MaxQPSIPRule(X), DropAction())
setOutgoingDoHWorkerThreads(6)

0 comments on commit 7c7bdbf

Please sign in to comment.