[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pdns-users
Subject:    [Pdns-users] lua script suggestions
From:       Gustavo Villegas <gustavovillega () gmail ! com>
Date:       2016-02-24 17:18:12
Message-ID: CAG2c0V3E0vDSCUtkXtTU_ZL8pCED344nGP3PJH4Y0cEkAqNCTw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

[Attachment #5 (text/html)]

<div dir="ltr">Hi everyone,<div><br></div><div>i&#39;m trying to make a LUA script  \
</div><div>but have some issues, apreciate your \
sugestions</div><div><br></div><div>added a class IP  </div><div>=&gt; \
badips:addMask(&quot;NN.NN.NN.0/24&quot;)</div><div><br></div><div>and try to check \
if answer data is inside this class, something like:   \
&quot;badips:match(rem)&quot;</div><div><br></div><div>but in postresolve i get an \
error when I write : badips:match( v:getContent())</div><div>how can ask if the \
resolved IP is inside the class ?</div><div><br></div><div>I can change the IP \
adderss in postresolve with  v:changeContent(&quot;185.45.32.4&quot;)</div><div>how \
can i change the name &quot;v:name&quot;?</div><div><br></div><div>out objetive is \
redirect the answer if the query is inside a IP address \
range</div><div><br></div><div>or how can I redirect the response to a diferent \
name:ip address  </div><div>if the   request resolved for a IP address in a specified \
range ?</div><div><br></div><div>Hope can \
help,</div><div><br></div><div>txs</div><div><br></div><div>Gustavo</div><div>PD. \
sorry for my english</div><div><br></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic