Mikrotik split-dns: hulle het dit gedoen

Minder as 10 jaar het verloop sedert die ontwikkelaars van RoS (in stabiele 6.47) funksionaliteit bygevoeg het wat jou toelaat om DNS-versoeke in ooreenstemming met spesiale reëls te herlei. As dit vroeër nodig was om met Layer-7-reëls in die firewall te ontduik, word dit nou eenvoudig en elegant gedoen:

/ip dns static
add forward-to=192.168.88.3 regexp=".*\.test1\.localdomain" type=FWD
add forward-to=192.168.88.56 regexp=".*\.test2\.localdomain" type=FWD

My geluk ken geen perke nie!

Waarmee bedreig dit ons?

Op 'n minimum raak ons ​​ontslae van vreemde NAT-konstrukte soos hierdie:


/ip firewall layer7-protocol
add comment="DNS Nat contoso.com" name=contoso.com regexp="\x07contoso\x03com"
/ip firewall mangle
add action=mark-packet chain=prerouting comment="mark dns contoso.com" dst-address-type=local dst-port=53 in-interface-list=DNSMASQ layer7-protocol=contoso.com new-packet-mark=dns-contoso.com passthrough=yes protocol=udp
add action=mark-packet chain=prerouting comment="mark dns contoso.com" dst-address-type=local dst-port=53 in-interface-list=DNSMASQ layer7-protocol=contoso.com new-packet-mark=dns-contoso.com passthrough=yes protocol=tcp
/ip firewall nat
add action=dst-nat chain=dstnat comment="DST-NAT dns contoso.com" dst-port=53 in-interface-list=DNSMASQ packet-mark=dns-contoso.com protocol=udp to-addresses=192.0.2.15
add action=dst-nat chain=dstnat comment="DST-NAT dns contoso.com" dst-port=53 in-interface-list=DNSMASQ packet-mark=dns-contoso.com protocol=tcp to-addresses=192.0.2.15
add action=masquerade chain=srcnat comment="mask dns contoso.com" dst-port=53 packet-mark=dns-contoso.com protocol=udp
add action=masquerade chain=srcnat comment="mask dns contoso.com" dst-port=53 packet-mark=dns-contoso.com protocol=tcp

En dit is nie al nie, nou kan jy verskeie expediteurs registreer, wat sal help om dns-failover te maak.
Intelligente DNS-verwerking sal dit moontlik maak om ipv6 in die maatskappy se netwerk te begin bekendstel. Voor dit het ek dit nie gedoen nie, die rede is dat ek 'n aantal dns-name na plaaslike adresse moes oplos, en in ipv6 kon dit nie sonder taamlike groot krukke gedoen word nie.

Bron: will.com