Re: [Pdns-users] failover LUA record
ifurlup it is. Thank you for your help ! On Wed, Sep 21, 2022 at 7:53 AM Jahanzeb Arshad via Pdns-users < pdns-users@mailman.powerdns.com> wrote: > Hmmm my mistake. I assumed that the syntax for addresses for ifportup > should be the same for ifurlup. Checked on my server with version 4.6.3 and > its also giving me error. > > So would suggest using the ifurlup check for failover. > Regards > *Jahanzeb Arshad* > > On 20/9/22 22:29, Adrian Minta via Pdns-users wrote: > > Yes, of course http get is a better option for web servers. > > Strangely the ifportup line doesn't seems to work on my server. I get > "Host ... not found: 2(SERVFAIL)" > > Could this be the caused by my server version, 4.4.1 ? > > On 9/20/22 19:33, Jahanzeb Arshad via Pdns-users wrote: > > You can do with ifportup also like this: > > www.domain.com60INLUAA "ifportup(443, > {{'192.168.1.10'},{'192.168.2.20'}}, {timeout=5})" > > I suggested ifurlup because it will actually do http get request and > verify if it responds with 200 OK message. A better health check for web > servers. > Regards > *Jahanzeb Arshad* > > On 20/9/22 21:18, Adrian Minta via Pdns-users wrote: > > 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.com60INLUAA "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 > listPdns-users@mailman.powerdns.comhttps://mailman.powerdns.com/mailman/listinfo/pdns-users > > > ___ > Pdns-users mailing > listPdns-users@mailman.powerdns.comhttps://mailman.powerdns.com/mailman/listinfo/pdns-users > > -- > Best regards, > Adrian Minta > > > > > ___ > Pdns-users mailing > listPdns-users@mailman.powerdns.comhttps://mailman.powerdns.com/mailman/listinfo/pdns-users > > > ___ > Pdns-users mailing > listPdns-users@mailman.powerdns.comhttps://mailman.powerdns.com/mailman/listinfo/pdns-users > > -- > Best regards, > Adrian Minta > > > > > ___ > Pdns-users mailing > listPdns-users@mailman.powerdns.comhttps://mailman.powerdns.com/mailman/listinfo/pdns-users > > ___ > Pdns-users mailing list > Pdns-users@mailman.powerdns.com > https://mailman.powerdns.com/mailman/listinfo/pdns-users > ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] failover LUA record
Hmmm my mistake. I assumed that the syntax for addresses for ifportup should be the same for ifurlup. Checked on my server with version 4.6.3 and its also giving me error. So would suggest using the ifurlup check for failover. Regards *Jahanzeb Arshad* On 20/9/22 22:29, Adrian Minta via Pdns-users wrote: Yes, of course http get is a better option for web servers. Strangely the ifportup line doesn't seems to work on my server. I get "Host ... not found: 2(SERVFAIL)" Could this be the caused by my server version, 4.4.1 ? On 9/20/22 19:33, Jahanzeb Arshad via Pdns-users wrote: You can do with ifportup also like this: www.domain.com 60 IN LUA A "ifportup(443, {{'192.168.1.10'},{'192.168.2.20'}}, {timeout=5})" I suggested ifurlup because it will actually do http get request and verify if it responds with 200 OK message. A better health check for web servers. Regards *Jahanzeb Arshad* On 20/9/22 21:18, Adrian Minta via Pdns-users wrote: 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@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users -- Best regards, Adrian Minta ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users -- Best regards, Adrian Minta ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] failover LUA record
Yes, of course http get is a better option for web servers. Strangely the ifportup line doesn't seems to work on my server. I get "Host ... not found: 2(SERVFAIL)" Could this be the caused by my server version, 4.4.1 ? On 9/20/22 19:33, Jahanzeb Arshad via Pdns-users wrote: You can do with ifportup also like this: www.domain.com 60 IN LUA A "ifportup(443, {{'192.168.1.10'},{'192.168.2.20'}}, {timeout=5})" I suggested ifurlup because it will actually do http get request and verify if it responds with 200 OK message. A better health check for web servers. Regards *Jahanzeb Arshad* On 20/9/22 21:18, Adrian Minta via Pdns-users wrote: 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@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users -- Best regards, Adrian Minta ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users -- Best regards, Adrian Minta ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] failover LUA record
You can do with ifportup also like this: www.domain.com 60 IN LUA A "ifportup(443, {{'192.168.1.10'},{'192.168.2.20'}}, {timeout=5})" I suggested ifurlup because it will actually do http get request and verify if it responds with 200 OK message. A better health check for web servers. Regards *Jahanzeb Arshad* On 20/9/22 21:18, Adrian Minta via Pdns-users wrote: 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@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users -- Best regards, Adrian Minta ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] failover LUA record
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@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users -- Best regards, Adrian Minta ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] failover LUA record
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@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users