[Pdns-users] Client IP address in backend query?

Daniel Eggleston daniel at eggleston.me.uk
Mon Oct 1 14:30:29 UTC 2007


bert hubert wrote:
> On Mon, Oct 01, 2007 at 12:14:16PM +0100, Daniel Eggleston wrote:
>   
>> Does anybody know if it's possible to pass the client IP address as a 
>> variable to the gmysql backend in a custom query?
>>     
>
> What an interesting idea! Not immediately obvious how to add it though. We
> could have a certain magic %IP% instruction or so.
>
>   
>> I am currently using the binary RPM distribution but am willing to 
>> rebuild from source if required -  any help appreciated!
>>     
>
> The canonical way to do things like these is via the pipe backend. Are you
> sure your needs could be matched by getting the client IP in the SQL query?
>
> 	Bert
>
>   
Thanks, I reckon I can do what we need using the pipe backend - I've 
modified the sample perl coprocess to query our mysql db based on the 
'remote-ip-address'.

Thanks for the quick response.



More information about the Pdns-users mailing list