[Pdns-users] how to redirect DNS answers ?

Gustavo Villegas gustavovillega at gmail.com
Wed Feb 24 20:58:00 UTC 2016


Hi everyone,

i'm trying to make a LUA script
but have some issues, apreciate your sugestions

added a class IP
=> badips:addMask("NN.NN.NN.0/24")

and try to check if answer data is inside this class, something like:
 "badips:match(rem)"

but in postresolve i get an error when I write : badips:match(
v:getContent())
how can ask if the resolved IP is inside the class ?

I can change the IP adderss in postresolve
with v:changeContent("185.45.32.4")
how can i change the name "v:name"?

out objetive is redirect the answer if the query is inside a IP address
range

or how can I redirect the response to a diferent name:ip address
if the  request resolved for a IP address in a specified range ?

Hope can help,

txs

Gustavo
PD. sorry for my english
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20160224/539c4b0e/attachment.html>


More information about the Pdns-users mailing list