I have a split horizon setup working just fine - but I don't know if there's a more "elegant" way of doing it. At the moment, my lua script is a long if...elseif construct for all the domains hosted locally.

function preresolve ( requestorip, domain, qtype )
    if string.find( domain, "domain1.com." ) and qtype == pdns.A then
        return 0, { { qtype=pdns.A, content="192.168.0.4" } }
    elseif string.find( domain, "domain2.com." ) and qtype == pdns.A then
        return 0, { { qtype=pdns.A, content="192.168.0.4" } }
    elseif string.find( domain, "domain3.com." ) and qtype == pdns.A then
        return 0, { { qtype=pdns.A, content="192.168.0.4" } }
    else
        return -1, {}
    end
end

Is there a "better" way?
--
Daniel
_______________________________________________
Pdns-users mailing list
[email protected]
http://mailman.powerdns.com/mailman/listinfo/pdns-users

Reply via email to