I have made this little rewrite to avoid other from pit falling into the same mistake I made myself, and read the existent code as a list of IP's inside `bad.ips`, and not a script returning pre-formatted IPs.
nmg = newNMG()
nmg:addMask("127.0.0.0/8")
nmg:addMasks({"213.244.168.0/24", "130.161.0.0/16"})
- nmg:addMasks(dofile("bad.ips")) -- contains return {"ip1","ip2"..}
+ nmg:addMasks(dofile("bad-ips.lua")) -- a lua script that return {"ip1","ip2"..}
if nmg:match(dq.remoteaddr) then
print("Intercepting query from ", dq.remoteaddr)