[Pdns-users] failover LUA record

Adrian Minta adrian.minta at gmail.com
Tue Sep 20 16:18:43 UTC 2022


Thank you !

I wasted 4 hours looking for a valid combination :(

Is this not possible with ifportup ?


On 9/20/22 15:37, Jahanzeb Arshad via Pdns-users wrote:
>
> Hi,
>
> If its a web server I would suggest using url check instead of port 
> check like below:
>
> www.domain.com 60    IN    LUA    A "ifurlup('https://www.domain.com', 
> {{'192.168.1.10'},{'192.168.2.20'}}, {timeout=5})"
>
> Regards
> *Jahanzeb Arshad*
>
> On 20/9/22 17:25, Adrian M via Pdns-users wrote:
>> Hi,
>> I'm attempting to implement a simple fail-over mechanism between two 
>> web servers but I'm not able to find the right syntax.
>>
>> www  LUA     A          (";if ifportup(443, {'192.168.0.10'}) then "
>>                                    "      return '192.168.0.10'       
>>        "
>>                                    "else               "
>>                                    "      return '10.0.0.10'         
>>       "
>>                                    "end                ")
>>
>> Any suggestions are welcome !
>>
>> _______________________________________________
>> Pdns-users mailing list
>> Pdns-users at mailman.powerdns.com
>> https://mailman.powerdns.com/mailman/listinfo/pdns-users
>
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> https://mailman.powerdns.com/mailman/listinfo/pdns-users

-- 
Best regards,
Adrian Minta

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20220920/155b2113/attachment.htm>


More information about the Pdns-users mailing list