Re: [dnsdist] dnsdist: use netmaskGroup with DynBlockRules exclude/includeRange
On Tue, Jul 27, 2021 at 01:38:08PM +, dmachard via dnsdist wrote: > Hi all, > > I am trying to use a netmaskgroup object in my DynBlockRulesGroup object with > the function "includeRange" > as introduced with the version 1.6.0 > > My config: > > nmg_internal = newNMG() > nmg_internal:addMask("10.0.0.0/8") > > local dbr = dynBlockRulesGroup() > dbr:includeRange(nmg_internal) > dbr:setQueryRate(30, 10, "Exceeded query rate", 60) > > function maintenance() > dbr:apply() > end > > > The error I am getting: > > Fatal Lua error: [string "chunk"]:40: Unable to convert parameter from nil to > 12NetmaskGroup > stack traceback: > [C]: in function 'NetmaskGroupRule' > [string "chunk"]:40: in main chunk > > > I am using the following version My guess it's the "local" keyword in global scope, it's semantics are such that it's not very useful. -Otto > > # dnsdist --version > dnsdist 1.6.0 (Lua 5.1.4 [LuaJIT 2.0.4]) > Enabled features: cdb dns-over-tls(gnutls openssl) dns-over-https(DOH) > dnscrypt fstrm ipcipher libsodium lmdb protobuf re2 recvmmsg/sendmmsg snmp > systemd > > I can't find what I'm doing wrong, do you have any idea? > > denis > > _ > > Ce message et ses pieces jointes peuvent contenir des informations > confidentielles ou privilegiees et ne doivent donc > pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu > ce message par erreur, veuillez le signaler > a l'expediteur et le detruire ainsi que les pieces jointes. Les messages > electroniques etant susceptibles d'alteration, > Orange decline toute responsabilite si ce message a ete altere, deforme ou > falsifie. Merci. > > This message and its attachments may contain confidential or privileged > information that may be protected by law; > they should not be distributed, used or copied without authorisation. > If you have received this email in error, please notify the sender and delete > this message and its attachments. > As emails may be altered, Orange is not liable for messages that have been > modified, changed or falsified. > Thank you. > > ___ > dnsdist mailing list > dnsdist@mailman.powerdns.com > https://mailman.powerdns.com/mailman/listinfo/dnsdist ___ dnsdist mailing list dnsdist@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/dnsdist
Re: [dnsdist] dnsdist: use netmaskGroup with DynBlockRules exclude/includeRange
Re; I found my mistake, netmaskGroup working fine . My error was because of another part of my config where the name of the NMG was incorrect. Denis De : dnsdist De la part de dmachard via dnsdist Envoyé : mardi 27 juillet 2021 15:38 À : dnsdist@mailman.powerdns.com Objet : [dnsdist] dnsdist: use netmaskGroup with DynBlockRules exclude/includeRange Hi all, I am trying to use a netmaskgroup object in my DynBlockRulesGroup object with the function "includeRange" as introduced with the version 1.6.0 My config: nmg_internal = newNMG() nmg_internal:addMask("10.0.0.0/8") local dbr = dynBlockRulesGroup() dbr:includeRange(nmg_internal) dbr:setQueryRate(30, 10, "Exceeded query rate", 60) function maintenance() dbr:apply() end The error I am getting: Fatal Lua error: [string "chunk"]:40: Unable to convert parameter from nil to 12NetmaskGroup stack traceback: [C]: in function 'NetmaskGroupRule' [string "chunk"]:40: in main chunk I am using the following version # dnsdist --version dnsdist 1.6.0 (Lua 5.1.4 [LuaJIT 2.0.4]) Enabled features: cdb dns-over-tls(gnutls openssl) dns-over-https(DOH) dnscrypt fstrm ipcipher libsodium lmdb protobuf re2 recvmmsg/sendmmsg snmp systemd I can't find what I'm doing wrong, do you have any idea? denis _ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you. _ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you. ___ dnsdist mailing list dnsdist@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/dnsdist
[dnsdist] dnsdist: use netmaskGroup with DynBlockRules exclude/includeRange
Hi all, I am trying to use a netmaskgroup object in my DynBlockRulesGroup object with the function "includeRange" as introduced with the version 1.6.0 My config: nmg_internal = newNMG() nmg_internal:addMask("10.0.0.0/8") local dbr = dynBlockRulesGroup() dbr:includeRange(nmg_internal) dbr:setQueryRate(30, 10, "Exceeded query rate", 60) function maintenance() dbr:apply() end The error I am getting: Fatal Lua error: [string "chunk"]:40: Unable to convert parameter from nil to 12NetmaskGroup stack traceback: [C]: in function 'NetmaskGroupRule' [string "chunk"]:40: in main chunk I am using the following version # dnsdist --version dnsdist 1.6.0 (Lua 5.1.4 [LuaJIT 2.0.4]) Enabled features: cdb dns-over-tls(gnutls openssl) dns-over-https(DOH) dnscrypt fstrm ipcipher libsodium lmdb protobuf re2 recvmmsg/sendmmsg snmp systemd I can't find what I'm doing wrong, do you have any idea? denis _ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you. ___ dnsdist mailing list dnsdist@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/dnsdist