Date: Sun, 29 Jan 2017 01:43:50 +0300 From: =?UTF-8?B?0JLQuNGC0LDQu9C40Lk=?= <script_79@mail.ru> To: FreeBSD-questions@FreeBSD.org Message-ID: <1485643430.928933801@f396.i.mail.ru>
index | next in thread | raw e-mail
Good time all support team. H elp me please, to understand, how better to make in my situation i have 12 vlan interfaces (local subnets not across) and i need, when requesting (from any vlan interface)address vpn.delta.loc, the answer matched with interface ip address(vpn srv), from which the request came. i chose two programs : powerdns and djbdns, but i don't understand , which of them can , what I need. BIND has to do that(split, views), but I do not want to use the BIND, as m y home simple gtw just 1.2Gb/ 2.8GHz . And also want to use soft... more nix style... About powerdns found Lua script, that solves a similar problem : http://powerdns.13854.n7.nabble.com/Split-Horizon-Scripts-td7879.html ============================================================ Ok - further googling and examination of the wiki gave me a starting point. I've got it working but for two of my domains - the others work correctly. Can you tell me what's broken? The two domains that don't seem to work are "lv-mircom.us" and "lv-firealarm.us". function preresolve ( requestorip, domain, qtype ) if string.find( domain, "amfes.com." ) and qtype == pdns.A then return 0, { { qtype=pdns.A, content="192.168.0.2" } } elseif string.find( domain, "amfire.us." ) and qtype == pdns.A then return 0, { { qtype=pdns.A, content="192.168.0.2" } } elseif string.find( domain, "lv-mircom.us." ) and qtype == pdns.A then return 0, { { qtype=pdns.A, content="192.168.0.2" } } elseif string.find( domain, "lv-firealarm.us." ) and qtype == pdns.A then return 0, { { qtype=pdns.A, content="192.168.0.2" } } elseif string.find( domain, "alarmsonline.us." ) and qtype == pdns.A then return 0, { { qtype=pdns.A, content="192.168.0.2" } } elseif string.find( domain, "lgma.us." ) and qtype == pdns.A then return 0, { { qtype=pdns.A, content="192.168.0.2" } } elseif string.find( domain, "poweredup.us." ) and qtype == pdns.A then return 0, { { qtype=pdns.A, content="192.168.0.2" } } else return -1, {} end end -- Daniel ============================================================ And about djbdns, in the manual found such: http://cr.yp.to/djbdns/tinydns-data.html#differentiation ============================================================ For versions 1.04 and above: You may include a client location on each line. The line is ignored for clients outside that location. Client locations are specified by % lines: %lo:ipprefix means that IP addresses starting with ipprefix are in location lo . lo is a sequence of one or two ASCII letters. A client is in only one location; longer prefixes override shorter prefixes. For example, %in:192.168 %ex +jupiter.heaven.af.mil:192.168.1.2:::in +jupiter.heaven.af.mil:1.2.3.4:::ex specifies that jupiter.heaven.af.mil has address 192.168.1.2 for clients in the 192.168.* network and address 1.2.3.4 for everyone else. ============================================================ Please tell, which of these two programs, is better for my task? Internet domain will not be used, only local. External requests will redirected on another dns server. powerdns , as I understand it , does not support the split . Only through additional Lua scripts . djbdns , be able to work with one domain name ? Thank you -- -= Vitaliy =-help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1485643430.928933801>
