Dnsdist is bypassing some traffic that must be blocked #14876
Replies: 7 comments 3 replies
-
Please share the version of dnsdist that you are using, the configuration and the logs showing the issue, otherwise there is nothing we can do to help you. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Please share your configuration, otherwise there is no way for us to know what you are trying to achieve and whether this is working as expected. |
Beta Was this translation helpful? Give feedback.
-
below is sample of role that must hit |
Beta Was this translation helpful? Give feedback.
-
-- dnsdist configuration
---------------------------------------------------
-- Dns services
---------------------------------------------------
addAction(OrRule({OpcodeRule(DNSOpcode.Notify), OpcodeRule(DNSOpcode.Update), QTypeRule(DNSQType.AXFR), QTypeRule(DNSQType.IXFR), QTypeRule(DNSQType.ANY), OpcodeRule(DNSOpcode.Update), QTypeRule(DNSQType.SOA)}), RCodeAction(DNSRCode.REFUSED))
-- udp/tcp dns listening
setLocal("0.0.0.0:53", {doTCP = true})
pc = newPacketCache(500000, {maxTTL=86400, minTTL=0, temporaryFailureTTL=300, staleTTL=300, dontAge=true}) -- 500k entries, 1-day TTL
-- Pools
---------------------------------------------------
pool_auth = "AUTH"
-- members definition
newServer({
name = "NS01",
address = "",
useProxyProtocol=true,
pool = pool_auth,
qps = 4000,
})
newServer({
name = "NS02",
address = "",
useProxyProtocol=true,
pool = pool_auth,
qps = 4000,
})
-- set the load balacing policy to use
setPoolServerPolicy(roundrobin, pool_auth)
-- enable cache for the pool
getPool(pool_auth):setCache(pc)
---------------------------------------------------
-- Rules
---------------------------------------------------
-- matches all incoming traffic and send-it to the pool of resolvers
addAction(
AllRule(),
PoolAction(pool_auth)
)
setACL({'0.0.0.0/0'})
bpf = newBPFFilter({ipv4MaxItems=30000, ipv6MaxItems=30000, qnamesMaxItems=60240})
setDefaultBPFFilter(bpf)
local dbr = dynBlockRulesGroup()
dbr:setQueryRate(100, 5, "Exceeded query rate", 600,DNSAction.Drop, 50)
dbr:setRCodeRate(DNSRCode.NXDOMAIN, 1, 1, "Exceeded NXD rate", 1800,DNSAction.Drop, 1)
dbr:setRCodeRate(DNSRCode.NXDOMAIN, 4, 20, "Exceeded NXD rate2", 1800,DNSAction.Drop, 2)
dbr:setRCodeRate(DNSRCode.SERVFAIL, 10, 1, "Exceeded ServFail rate", 1200,DNSAction.Drop, 5)
dbr:setQTypeRate(DNSQType.ANY, 5, 1, "Exceeded ANY rate", 1200,DNSAction.Drop, 2)
dbr:setResponseByteRate(10000, 5, "Exceeded resp BW rate", 600,DNSAction.Drop, 5000)
function maintenance()
dbr:apply()
end
setRingBuffersSize(1000000, 100)
setMaxTCPClientThreads(20)
webserver("0.0.0.0:8083")
setWebserverConfig({acl="0.0.0.0/0"})
setSyslogFacility(8) |
Beta Was this translation helpful? Give feedback.
-
sorry for late reply |
Beta Was this translation helpful? Give feedback.
-
@rgacogne hello and happy new year did you get chance to review above configuration |
Beta Was this translation helpful? Give feedback.
-
Dears,
we have some blocking roles based on number of nxdomain responses from NS server configure on dnsdist , what we have discoverred is that most of IPs is blocked , but some of them is not blocked despite when check logs found that they hit limit and must be blocked , how to troubleshoot that may i know if there is limit on how many IPs by default dnsdist should block
Beta Was this translation helpful? Give feedback.
All reactions