Mikrotik స్ప్లిట్-dns: వారు చేసారు

10 సంవత్సరాల కంటే తక్కువ తర్వాత, RoS డెవలపర్లు (స్థిరమైన 6.47లో) ప్రత్యేక నియమాల ప్రకారం DNS ప్రశ్నలను దారి మళ్లించడానికి మిమ్మల్ని అనుమతించే కార్యాచరణను జోడించారు. ఇంతకుముందు ఫైర్‌వాల్‌లో లేయర్ -7 నియమాలతో ఓడించాల్సిన అవసరం ఉంటే, ఇప్పుడు ఇది సరళంగా మరియు సొగసైనదిగా చేయబడుతుంది:

/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

నా ఆనందానికి అవధులు లేవు!

ఇది మాకు ఏమి బెదిరిస్తుంది?

కనీసం, మేము ఇలాంటి వింత NAT నిర్మాణాలను వదిలించుకుంటాము:


/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

మరియు అంతే కాదు, ఇప్పుడు మీరు చాలా మంది ఫార్వార్డర్‌లను నమోదు చేసుకోవచ్చు, ఇది dns ఫెయిల్‌ఓవర్ చేయడానికి సహాయపడుతుంది.
ఇంటెలిజెంట్ DNS ప్రాసెసింగ్ కంపెనీ నెట్‌వర్క్‌లో ipv6ని పరిచయం చేయడాన్ని సాధ్యం చేస్తుంది. దీనికి ముందు, నేను దీన్ని చేయలేదు, కారణం ఏమిటంటే నేను స్థానిక చిరునామాలకు అనేక dns పేర్లను పరిష్కరించాల్సిన అవసరం ఉంది మరియు ipv6 లో ఇది పెద్ద క్రచెస్ లేకుండా చేయలేము.

మూలం: www.habr.com