Dnsmasq thiab Cov Ntawv Teev Ncaj Qha - SME Networks

General index ntawm lub series: Computer Networks rau cov SMEs: Taw qhia

Nyob zoo cov phooj ywg !. To taub thiab ua raws li cov lus no yog indispensable nyeem nws cov thawj ntawm:

Lawv piav qhia qhov theoretical thiab cov ntsiab lus tswv yim uas peb yuav tsis hais txog hauv qhov no. Peb yuav hloov cov faib khoom hauv xyoo tam sim no mus Debian 8.6 "Jessie" thiab peb yuav txuas ntxiv nrog cov qub uas peb siv nyob rau hauv BIND thiab Active Directory®.

  • Cov txheej txheem tau piav qhia hauv cov ncej no kuj tseem siv tau rau CentOS 7. Cov ntaub ntawv teeb tsa / lwm yam / dnsmasq kuj zoo ib yam. Kuv tshaj tawm nws vim tias kuv xav tias nws tsis tsim nyog los sau dua ib tsab xov xwm rau Dnsmasq thiab Active DirectoryRaws li CentOSCov. Qhov zoo, cov ntawv qhia ntsig txog cov ntaub ntawv thiab kev teeb tsa yog tib yam. 😉
  • Lub Dnsmaq yog ib qho kev tsim ntawm Ximoos Kelley

Txwv tsis pub siv Dnsmasq

Vim nws tseem ceeb peb rov ua lub TXWV uas txhawb nqa Dnsmasq -run tus txiv neej dnsmasq- uas xav txog raws nraim tus ntxiv mus:

TXWV

  • Lub ntsiab lus tseem ceeb rau cov peev txheej txwv feem ntau yog kev txuag, thiab tsim nyog siv rau ntawm cov khoom siv router. daig nrog qeeb processors thiab tsis nco. Hauv Radon ntau dua  muaj peev xwm, nws yog tau los nce cov kev txwv, thiab txhawb ntau yam ntxiv cov qhua tuaj noj mov. Cov hauv qab no siv rau dnsmasq-2.37: cov qauv ua dhau los tsis haum lawv tau nce siab thiaj zoo.
  • Dnsmasq muaj peev xwm txhawb DNS thiab DHCP tsawg kawg ib txhiab (1,000) cov qhua tuaj noj mov. Cov sijhawm xauj tsev yuav tsum tsis txhob yog luv dua (tsawg dua ib sijhawm). Tus nqi ntawm –dns-rau-max tuaj yeem nce ntxiv: pib nrog qhov sib npaug ntawm tus naj npawb ntawm cov neeg thiab nce nws yog qhov DNS. Nco ntsoov tias qhov ua tau zoo DNS tseem nyob ntawm cov servers Upstream DNS. DNS cache loj tuaj yeem nce ntxiv: qhov txwv Xav tau yog 10,000 npe thiab qhov pib (150) yog qhov tsawg heev. Xa cov SIGUSR1 rau dnsmasq ua rau cov ntaub ntawv bitacore uas yog Pab tau zoo rau kho lub cache loj. Saib Ntu ntawv ceeb toom rau cov ntsiab lus.
  • Tus neeg rau zaub mov TFTP ua tau yog muaj peev xwm txhawb nqa ntau kev hloov tsheb cov ntaub ntawv ib txhij: qhov txwv tsis pub tshaj yog cuam tshuam nrog tus naj npawb ntawm cov ntawv tuav tswj tau tso cai rau ib qho txheej txheem thiab muaj peev xwm ntawm sys‐tem hu xaiv () los txhawb nqa cov lej ntawm cov tuav ntaub ntawv ntau ntau. Yog hais tias qhov kev txwv tau muab tso siab dhau nrog –tftp-max nws yuav tau de-scaled thiab cov kev txwv yuav raug teev npe thaum pib. Nco ntsoov tias ntau hloov tsheb muaj peev xwm ua tau thaum tib cov ntaub ntawv xa dab tsi thaum txhua transferencia xa ib daim ntawv txawv. Nws yog qhov siv tau dnsmasq tsis kam tawm Web tshaj tawm siv ib daim ntawv teev npe ntawm cov lag luam tsim tau zoo hauv chij, txhua daws rau 127.0.0.1 lossis 0.0.0.0 nyob rau hauv / thiab lwm yam / hosts lossis hauv ib qho chaw xa ntawv ntxiv. Daim ntawv muaj peev xwm tau ntev ua luaj. Dnsmasq tau sim ua tiav nrog ib lab npe. Cov ntawv loj ntawd xav tau 1GHz CPU thiab kwv yees60MB RAM.
  • Dnsmasq muaj peev xwm txhawb DNS thiab DHCP tsawg kawg ib txhiab (1,000) cov neeg.

Cia peb nruab thiab teeb tsa Jessie thiab Dnsmasq

Peb yuav pib los ntawm kev tshiab thiab huv kev teeb tsa ntawm tus neeg rau zaub mov raws Debian 8 "Jessie"Cov. Ntawd yog, lub operating system tsis muaj graphical interface lossis lwm pob teeb tsa. Lub network tsis sib xws yuav yog tib yam li cov siv hauv kab lus BIND thiab Active Directory®:

Lub npe sau mordor.fan LAN Network 10.10.10.0/24 ====================================================== ======================================== Servers IP Address Lub Hom Phiaj (Servers nrog OS Windows) ====================================================== === ============================
sauron.mordor.fan. 10.10.10.3 Active Directory® 2008 SR2
mamba.mordor.fan. 10.10.10.4 Cov Ntaub Ntawv Hauv Windows
dns.mordor.fan 10.10.10.5 DnsMasq Server ntawm Jessie
darklord.mordor.fan. 10.10.10.6 Pov Thawj, lub rooj vag thiab cov foob pob hluav taws ntawm Kerios troll.mordor.fan. 10.10.10.7 Blog raws li ... tsis nco qab shadowftp.mordor.fan. 10.10.10.8 FTP server blackelf.mordor.fan. 10.10.10.9 Kev pabcuam puv e-mail yog blackspider.mordor.fan. 10.10.10.10 WWWV kev pab cuam palantir.mordor.fan. 10.10.10.11 Sib Tham hauv Openfire rau Windows tiag CNAME ============================== sauron ad-dc mamba fileserver darklord proxyweb troll blog shadowftp ftpserver dub nciab xa ntawv blackspider www palantir qhib siab

Thawj dns.mordor.fan chaw teeb tsa neeg rau zaub mov

paus @ dns: ~ # nano / etc / hostname
dns

paus @ dns: ~ # nano / thiab / hosts
127.0.0.1 localhost 10.10.10.5 dns.mordor.fan dns # Cov kab hauv qab no tsim nyog rau IPv6 muaj peev xwm ua :: :: localhost ip1-localhost ip6-loopback ff6 :: 02 ip1-allnodes ff6 :: 02 ip2-allrouters

hauv paus @ dns: ~ # nano / thiab / network / cuam tshuam
# Cov ntaub ntawv no piav qhia txog lub network cuam tshuam rau koj qhov system # thiab yuav ua li cas qhib lawv. Yog xav paub ntau ntxiv, saib kev cuam tshuam (5). source /etc/network/interfaces.d/* # Lub loopback network interface auto lo iface lo inet loopback # Qhov tseem ceeb network interface tso cai-hotplug eth0 iface eth0 inet zoo li qub chaw nyob 10.10.10.5 netmask 255.255.255.0 network 10.10.10.0 tshaj tawm 10.10.10.255. 10.10.10.1 lub qhov rooj 127.0.0.1 # dns- * cov kev xaiv raug ua los ntawm kev daws teeb meem pob, yog tias ntsia dns-nameservers XNUMX dns-nrhiav mordor.fan

Cia peb nruab Dnsmasq thiab htop

hauv paus @ dns: ~ # aptitude nruab dnsmasq htop

Tom qab kev txhim kho pob htop peb tuaj yeem tshawb xyuas CPU thiab kev nco qab ntawm cov khoom siv. Nws tsuas yog siv txog 71 megabytes ntawm RAM. Yog tias peb xav kom qis dua kev noj haus ntau dua, peb tuaj yeem nruab pob ntawv SSMTP -saib MTA- uas nyob rau hauv lem purges lub pob Exim 4 tias Debian ib txwm teeb tsa los ntawm lub neej ntawd thiab tias peb tsis tshua xav tau raws li kev siv peb yuav muab rau tus neeg rau zaub mov no:

hauv paus @ dns: ~ # aptitude nruab ssmtp
hauv paus @ dns: ~ # kev paub daws teeb meem ~ c
paus @ dns: ~ # txuj ci huv si
hauv paus @ dns: ~ # kev ncaj ncees autoclean
hauv paus @ dns: ~ # systemctl reboot

Tom qab rov qab pib lub computer, qhov tau noj yog raws li nram no: Dnsmasq thiab Cov Ntawv Taw Qhia

 

Tsawg, txoj cai? Peb mus.

Cia peb qhia tias Dnsmasq tseem tawm tswv yim rau Microsft® DNS

Kuaj qhov ua tau Dnsmasq teeb tsa koj lub computer dns.mordor.fan, peb yuav tsum suav nrog tsab ntawv hais tawm tias Microsoft DNS ntawm tus neeg rau zaub mov yog kev sab laj sauron.mordor.fanCov. Peb tuaj yeem ua nws nrog rau daim ntawv qhia server = / mordor.fan / 10.10.10.3 nyob hauv cov ntawv ntawd dnsmasq.conf ib -ib peb yuav pom tom qab- lossis ntxiv txoj kab npe ntawm 10.10.10.3 nyob hauv cov ntawv ntawd /etc/resolv.confCov. Raws li peb tseem tsis tau teeb tsa Dnsmasq raws li peb xav tau, peb xaiv txoj kev thib ob:

paus @ dns: ~ # nano /etc/resolv.conf
sau mordor.fan
npe ntawm 127.0.0.1
npe ntawm 10.10.10.3

Tam sim no peb tuaj yeem daws DNS cov lus nug

Nrog lub neej ntawd teeb tsa ntawm Dnsmasq muab los ntawm nws cov ntaub ntawv tseem ceeb /etc/dnasmq.conf, thiab nrog dab tsi tshaj tawm hauv cov ntawv /etc/resolv.conf los ntawm cov neeg rau zaub mov nws tus kheej «dns«, Txhua tus neeg txuas nrog txuas LAN - thiab uas tau tshaj tawm tias yog DNS server dns.mordor.fan- koj tuaj yeem daws cov lus nug DNS thaum them nyiaj ntawm Microsoft® DNS tamsim no…

  • Nws yog qhov tseem ceeb heev los kuaj xyuas qhov lus teb ceev ntawm Dnsmasq thaum ua kom pom nws cov xwm txheej li Ncauj los ntawm kev suav nrog tus IP 10.10.10.3 hauv koj cov ntawv /etc/resolv.conf.

Los ntawm kuv kev tswj hwm kev tswj hwm thiab kev txhawb nqa ntawm txhua qhov kev pabcuam los ntawm kev uas kuv sau, Kuv khiav:

buzz @ sysadmin: ~ $ miv /etc/resolv.conf 
# Tsim los ntawm NetworkManager sau mordor.fan nameserver 10.10.10.5

buzz @ sysadmin: ~ $ nslookup
> dns
Neeg rau zaub mov: 10.10.10.5 Chaw Nyob: 10.10.10.5 # 53 Lub Npe: dns.mordor.fan Chaw Nyob: 10.10.10.5

> sauron
Neeg rau zaub mov: 10.10.10.5 Chaw Nyob: 10.10.10.5 # 53

Cov lus teb tsis muaj ntaub ntawv:
Lub npe: sauron.mordor.fan Chaw Nyob: 10.10.10.3

> 03296249-82a1-49aa-a4f0-28900f5d256b._msdcs.mordor.fan
Neeg rau zaub mov: 10.10.10.5 Chaw Nyob: 10.10.10.5 # 53 03296249-82a1-49aa-a4f0-28900f5d256b._msdcs.mordor.fan canonical npe = sauron.mordor.fan. Lub npe: sauron.mordor.fan Chaw Nyob: 10.10.10.3

> 10.10.10.3
Neeg rau zaub mov: 127.0.0.1 Chaw Nyob: 127.0.0.1 # 53 3.10.10.10.in-addr.arpa npe = sauron.mordor.fan.

> 10.10.10.9
Neeg rau zaub mov: 127.0.0.1 Chaw Nyob: 127.0.0.1 # 53 9.10.10.10.in-addr.arpa npe = blackelf.mordor.fan.

> 10.10.10.5
Neeg rau zaub mov: 127.0.0.1 Chaw Nyob: 127.0.0.1 # 53 5.10.10.10.in-addr.arpa npe = dns.mordor.fan.

> xa
Neeg rau zaub mov: 10.10.10.5 Chaw Nyob: 10.10.10.5 # 53 Cov lus teb tsis teb: mail.mordor.fan canonical npe = blackelf.mordor.fan. Lub npe: blackelf.mordor.fan Chaw Nyob: 10.10.10.9> tawm

buzz @ sysadmin: ~ $

Cia peb ua tibzoo saib mus rau hauv qab no:

  • dns.mordor.fan ncaj qha teb cov lus nug DNS uas nws tuaj yeem daws raws li koj cov chaw Dnsmasq tam sim no. Yog tias koj tsis tuaj yeem daws lawv, nws ua haujlwm zoo li Ncauj thiab nug IP 10.10.10.3 yog tias nws tuaj yeem teb cov lus nug. Thaum nug rau IP ntawm cov khoom siv «dns«, Nws teb ncaj qha. Thaum Dnsmasq yog nug uas yog nws «sauron",?, ua forwarding Rau qhov 10.10.10.3 -Koj tsis tuaj yeem teb ncaj qha vim tias koj tsis tau rau npe nws-txog leej twg rov sau Cov Lus Teb Tsis Yog-Cov Ntawv Tso Cai.
  • Thaum nug seb leej twg yog «03296249-82a1-49aa-a4f0-28900f5d256b._msdcs.mordor.fan"?, ua forwarding ib zaug ntxiv thiab lub sijhawm no koj tau txais Cov Lus Teb Sau Los ntawm Microsoft® DNS.
  • Lub siab teb ceev ntawm Dnsmasq rau txhua yam lus nug.

Lawv yog cov ntsiab lus me me uas ua rau kev hlub zoo ;-).

Siv cov sib txawv ntawm Dnsmasq thiab BIND kev koom ua ke nrog rau Kev Ua Kom Ua Txhua Zog ®

Cia peb khiav ob peb DNS nug ntawm cov ntaub ntawv SOA y NS ntawm cov sau mordor.fan, rau txhua tus ntawm cov nameservers muab kev koom tes:

buzz @ sysadmin: ~ $ tswv -t SOA mordor.fan 10.10.10.3
Kev siv lub npe server: Lub Npe: 10.10.10.3 Chaw Nyob: 10.10.10.3 # 53 Aliases: 
mordor.fan muaj SOA cov ntaub ntawv sauron.mordor.fan. tus tswv host.mordor.fan. 56 900 600 86400 3600 XNUMX XNUMX

buzz @ sysadmin: ~ $ tswv -t SOA mordor.fan 10.10.10.5
Kev siv lub npe server: Lub Npe: 10.10.10.5 Chaw Nyob: 10.10.10.5 # 53 Aliases: 
mordor.fan muaj SOA cov ntaub ntawv sauron.mordor.fan. tus tswv host.mordor.fan. 56 900 600 86400 3600 XNUMX XNUMX

buzz @ sysadmin: ~ $ tswv -t NS mordor.fan 10.10.10.5
Kev siv lub npe server: Lub Npe: 10.10.10.5 Chaw Nyob: 10.10.10.5 # 53 Aliases: 
mordor.fan lub npe server sauron.mordor.fan.

buzz @ sysadmin: ~ $ tswv -t NS mordor.fan 10.10.10.3
Kev siv lub npe server: Lub Npe: 10.10.10.3 Chaw Nyob: 10.10.10.3 # 53 Aliases: 
mordor.fan lub npe server sauron.mordor.fan.

Cov lus teb yog zoo ib yam - uas yog muaj kuab - vim yeej ib txwm teb sauron.mordor.fanCov. ua ntej nug DNS txog cov ntaub ntawv SOA o NStab sis yog zoo saib nws teb li cas dns.mordor.fanCov. Txawm li cas los nws txawv ntawm qhov pom hauv tsab xov xwm BIND thiab Active Directory® qhov uas peb tau tshem tawm txoj haujlwm ntawm Microsoft® DNS kom tiav. Hauv kab lus ntawd TXHUA DNS nug txog Domino Namespace mordor.fan Qhov BIND teb lawv, vim tias peb tau teeb tsa nws txoj hauv kev ntawd, thiab vim tias KHWV teb cov lus nug SOA y NS ntxiv rau kev tso cai Master - Qhev, Thaj tsam hloov chaw, thiab lwm yam, thiab yog li ntawd nws yog ntau qhov ua tiav DNS server - complex.

Tej zaum cov ntawd yog qhov sib txawv tseem ceeb ntawm DNS ntawm Dnsmasq thiab BIND ... Tab sis KHI - muaj ib txwm muaj ib lossis ntau buts - tsis muaj DHCP neeg rau zaub mov uas sib txuas ua ke nrog DNS server nyob hauv ib qho daemond, thiab tsis tas yuav tsum siv TSIG cov yawm sij, cov ntaub ntawv teeb tsa, Cov Ntaub Ntawv Thaj Tsam, thiab lwm yam, zoo li peb tau pom hauv cov ntawv dhau los.

  • Kuv xav tias los ntawm tam sim no, Nyob Zoo Txog Cov Neeg Nyeem yuav tau pom tias kuv tsis ntxub BIND los yog nyiam Dnsmasq rau BIND. Cov kev sib tham yav tom ntej txog nws yog qhov siv tag nrho ntawm lub sijhawm, vim nws muaj ntau yam ua nrog kev xav tau, xav tau, nyiam, nyiam thiab thiab ...Cov. txhua qhov kev daws tau nws ntxim nyiam ;-) ua.
  • Hauv cov xwm txheej zoo sib xws, txhua tus nruab thiab teeb tsa software ntawm qhov lawv nyiam thiab tias lawv paub ntau ntxiv txog. thiab txhua yam ua haujlwm raws li qhov xav tau.

Qhov zoo ntawm kev sib xyaw Dnsmasq + Active Directory®

Nrog ua ke no peb muaj tag nrho cov lus teb rau cov lus nug DNS thiab muaj txiaj ntsig zoo ntawm kev qiv IP chaw nyob rau peb cov SME LAN. Raws li peb yuav pom tom qab, nws ua haujlwm raug cai rau txhua qhov xwm txheej hais txog seb puas muaj lub koos pis tawj koom nrog Microsoft® Active Directory® Domain Controller. Ib qho ntxiv, peb muaj DNS thiab DNS server Ncauj par kev ua tau zoo, ntxiv rau DHCP neeg rau zaub mov ceev heev. Thiab txhua nrog tsawg qhov xav tau ntawm cov peev txheej. Koj puas xav tau ntxiv?

Puas yog nws tau Dnsmasq + KHI?

Mas nws yeej muaj. Txawm hais tias kuv pom zoo lawv tau nruab ntawm cov koos pij tawj sib txawv kom tsis muaj kev sib tsoo vim yog qhov chaw nres nkoj nyiam ntau 53 ntawm kev pabcuam DNS. Tej zaum peb yuav pom qee yam txog nws thaum peb mus txog rau Samba 4-based AD-DC. Leej twg paub?

Cov Lus Qhia Txog Dnamasq

  • Cov ntaub ntawv tseem ceeb ua haujlwm rau Dnsmasq muab DHCP thiab DNS cov kev pabcuam ntawm LAN yog: /etc/dnsmasq.conf, / etc / hosts, /var/lib/misc/dnsmasq.leasesThiab /etc/resolv.confCov. Cov ntaub ntawv dnsmasq.lease nws yog tsim thaum koj tso koj thawj tus IP chaw nyob.
  • Lwm txoj haujlwm ntawv koj tuaj yeem siv yog / thiab lwm yam / ethersCov. Yog tias muaj cov ntaub ntawv zoo li ntawd, qhov qhia ncaj qha nyeem-ethers tshaj tawm hauv cov ntawv config, qhia Dnsmasq nyeem nws. Nws zoo heev thaum peb cuam tshuam MAC chaw nyob / tswv npe rau qee yam.
  • Qhov kev pabcuam DNS tuaj yeem ua tiav tag nrho uas siv cov lus qhia chaw nres nkoj = 0 nyob rau hauv lub dnsmasq.conf ib.
  • DHCP pabcuam rau ib lossis ntau lub network cuam tshuam yuav raug xiam uav los ntawm kev taw qhia-ib qho rau txhua kab- tsis-dhcp-interface = eth0, tsis-dhcp-interface = eth1, thiab hais txog. Siv tau zoo heev thaum peb nyob sab pem hauv ntej ntawm pab pawg nrog 2-ntau dua- cov kev sib txuam network thiab peb xav kom DHCP muab kev pabcuam tsuas yog los ntawm ib tus lossis tsis muaj ib qho. Yog lawm, yog tias peb xiam DHCP pabcuam rau txhua qhov cuam tshuam, peb yuav tsuas yog tawm ntawm DNS kev ua haujlwm. Yog tias peb cuam tshuam ob qho kev pabcuam, vim li cas peb thiaj li xav tau Dnsmasq? 😉
  • Txheeb rau lwm tus DNS Domain Npe Servers uas tsis muaj yog pej xeem lossis sab nraud rau LAN - qhov yog thaum Microsoft DNS- peb ua nws los ntawm cov lus qhia server = / sau npe / DNS server IP nyob hauv cov ntawv ntawd /etc/dnsmasq.confCov. Piv txwv: server = / mordor.fan / 10.10.10.3.
  • Txhawm rau qhia Dnsmasq tias cov lus nug txog cov npe hauv nroog tau teb tsuas yog los ntawm cov ntawv / etc / hosts lossis dhau ntawm koj li DHCP, peb yuav tsum ntxiv cov lus qhia zos = / localnet / nyob rau hauv cov ntaub ntawv tseem ceeb ntawm koj kev teeb tsa. Piv txwv: zos = / mordor.fan /.
  • Txhawm rau kom zoo rau cov ntawv /etc/resolv.conf - daws peb tawm tswv yim nyeem phau ntawv nws siv siv cov lus txib tus txiv neej resolv.confCov. Yog tias koj nruab Debian 8.6 "Jessie" koj yuav pom tias nws tau sau ua lus Mev zoo.
  • Dnsmasq tsis siv Zones cov ntaub ntawv los teb cov lus nug ncaj qha lossis rov qab.
  • Yuav kom paub lub ntsiab ntawm txhua daim teb «tshwj xeeb»Qhov ntawd yog siv hauv kev tshaj tawm ntawm Ntawv Teev Cov Ntaub Ntawv Teev Tseg Sau Npe, koj yuav tsum sab laj BIND thiab Active Directory®Cov. Cov lus hauv syntax ntawm SRV cov ntaub ntawv sau cia /etc/dnsmasq.conf Nws yog raws li nram no:
    srv-tuav = , , , ,

Cov nyeem uas xav paub ntau dua, thov nyeem cov ntaub ntawv qub kom zoo /etc/dnsmasq.conf lossis cov ntaub ntawv uas twb muaj lawm hauv phau ntawv teev npe / usr / share / doc / dnsmasq-puag.

hauv paus @ dns: ~ # ls -l / usr / share / doc / dnsmasq-puag /
tag nrho 128 -rw-r - r-- 1 lub hauv paus 883 Lub Tsib Hlis 5 2015 cai -rw-r - r-- 1 lub hauv paus 36261 5 Tsib 2015 1 hloovelog.archive.gz -rw-r - r-- 11297 lub hauv paus 5 Lub Tsib Hlis 2015 1 changelog.Debian.gz -rw-r - r-- 26014 lub hauv paus 5 Lub Tsib Hlis 2015 1 changelog.gz -rw-r - r-- 2084 lub hauv paus 5 Lub Tsib Hlis 2015 1 DBus-interface. Gz -rw- r - r-- 4297 lub hauv paus 5 May 2015 2 doc.html drwxr-xr-x 4096 lub hauv paus 19 Feb 17 52:1 piv txwv -rw-r - r-- 9721 lub hauv paus 5 Tsib Hlis 2015 1 FAQ.gz -rw -r - r-- 4180 lub hauv paus plaub 5 Lub Tsib Hlis 2015 1 README.Debian -rw-r - r-- 12019 lub hauv paus 5 Lub Tsib Hlis 2015 XNUMX setup.html

Cia configure Dnsmasq thiab Resolver

Peb yuav coj los ua thawj daim ntawv qhia - hloov npe thiab lwm yam, yog lawm - cov ntaub ntawv teeb tsa siv hauv tsab xov xwm «Dnsmasq ntawm CentOS 7.3".

Cia peb tsis txhob hnov ​​qab cov kauj ruam tom ntej:

[cag @ dns ~] # mv /etc/dnsmasq.conf /etc/dnsmasq.conf.original

Cov chaw ruaj ntseg IP

Cov chaw nyob ntawm cov servers lossis khoos phis tawj uas xav kom muaj IP -both ruaj khov IPv4 raws li IPv6- tau tshaj tawm hauv cov ntaub ntawv / etc / hosts:

[cag @ dns ~] # nano / etc / hosts
127.0.0.1 localhost # Cov kab hauv qab no tsim nyog rau IPv6 muaj peev xwm: 1 localhost ip6-localhost ip6-loopback ff02 :: 1 ip6-allnodes ff02 :: 2 ip6-allrouters # Servers thiab khoos phis tawj nrog IPs tas. 10.10.10.1 sysadmin.mordor.fan 10.10.10.3 sauron.mordor.fan 10.10.10.4 mamba.mordor.fan 10.10.10.5 dns.mordor.fan 10.10.10.6 darklord.mordor.fan 10.10.10.7 troll.mordor.fan 10.10.10.8. 10.10.10.9 duab ntxoov ntxoo.Fordftp.mordor.fan 10.10.10.10 blackelf.mordor.fan 10.10.10.11 blackspider.mordor.fan XNUMX palantir.mordor.fan

Cia peb tsim cov ntaub ntawv /etc/dnsmasq.conf

[cag @ dns ~] # nano /etc/dnsmasq.conf
# ------------------------------------------------- ------------------ # KEV XAIV NEEG # ------------------------ - -------------------------------------- domain-xav tau # Tsis txhob sau npe tsis muaj tus tswv part bogus-priv # Tsis txhob hla chaw nyob hauv cov chaw tsis muaj neeg txuas ntxiv-txiav txim siab # Txuas ntxiv sau rau host interface = eth0 # Interface.  TSWV YIM ntawm Interface # tshwj tsis yog-interface = eth1 # TSIS mloog rau qhov NIC nruj-xaj # xaj nyob rau hauv uas koj sab laj /etc/resolv.conf file # suav nrog ntau ntxiv kev xaiv configuration # los ntawm cov ntaub ntawv lossis los ntawm kev nrhiav teeb tsa # cov ntaub ntawv ntxiv nyob rau hauv ib qho kev qhia # conf-file = / etc / dnsmasq.more.conf conf-dir = / etc / dnsmasq.d # Hais txog Cov Lus Qhia Sau Npe = mordor.fan # Domain Npe # Lub Sijhawm Server yog 10.10.10.1 10.10.10.1. XNUMX chaw nyob = / time.windows.com / XNUMX # Xa ib qho kev xaiv khoob ntawm WPAD tus nqi.  Xav tau # Windos 7 thiab tom qab tus neeg yuav khoom coj zoo.  ;-) dhcp-option = 252, "\ n" # Cov ntaub ntawv uas peb yuav tshaj tawm HOSTS uas yuav "raug txwv" addn-hosts = / etc / banner_add_hosts # Tham nrog Microsoft® DNS server "sauron" yog tias peb # khiav server = / mordor.fan / 10.10.10.3 # Cov lus nug txog cov npe hauv zos yuav teb # ntawm / thiab lwm yam / hosts lossis dhau los ntawm DHCP = / mordor.fan / # Cov lus nug txog PTR lossis Rov Qab cov ntawv yuav teb # ntawm cov servers dns "thiab" sauron "hauv qhov kev txiav txim server = / 10.10.10.in-addr.arpa / 10.10.10.5 server = / 10.10.10.in-addr.arpa / 10.10.10.3 # ------- - --------------------------------------------------------- --------- # REGISTROSCNAMEMXTXT # ------------------------------------- - ----------------------------- # Hom kev rau npe no yuav tsum nkag nkag rau # hauv / thiab / cov tswvcuab # ntawv piv txwv: 10.10.0.7. 10 troll.mordor.fan troll # cname = ALIAS, REAL_NAME cname = ad-dc.mordor.fan, sauron.mordor.fan cname = fileserver.mordor.fan, mamba.mordor.fan cname = proxyweb.mordor.fan, darklord .mordor.fan cname = blog.mordor .fan, troll.mordor.fan cname = ftpserver.mordor.fan, shadowftp.mordor.fan cname = mail.mordor.fan, blackelf.mordor.fan cname = www.mordor.fan, blackspider.mordor.fan = lub npe ua haujlwm .mordor.fan, palantir.mordor.fan # MX ntaub ntawv # Rov qab MX cov ntaub ntawv nrog lub npe "mordor.fan" destined # rau blackelf.mordor.fan pab neeg thiab qhov muaj feem thib 10 mx-host = mordor.fan, xa ntawv. mordor.fan, XNUMX # Lub hom phiaj ua tsis tiav rau MX cov ntaub ntawv tsim # siv cov kev xaiv hauv cheeb tsam yuav yog: mx-phiaj = mail.mordor.fan # Rov qab los MX cov ntaub ntawv taw qhia rau mx-phiaj rau TXHUA # cov ntawv hauv zos hauv zos # TXT cov ntaub ntawv. 

dhcp-daim ntawv xauj tsev-max = 222 # Tus naj npawb tag nrho ntawm chaw nyob rau daim ntawv xauj tsev
                        # yog tsis muaj 150 leej
# IPV6 Khwv # dhcp-khwv = 1234 ::, ra-tsuas yog # Xaiv rau QUB YEEJ # OPTIONS dhcp-xaiv = 1,255.255.255.0 # NETMASK dhcp-xaiv = 3,10.10.10.253 # ROUTER GATEWAY dhcp-option = 6,10.10.10.5. 15 # DNS Servers dhcp-option = 19,1, mordor.fan # DNS Domain Npe dhcp-xaiv = 28,10.10.10.255 # kev xaiv ip-txuas mus rau dhcp-kev xaiv = 42,10.10.10.1 # BROADCAST dhcp-kev xaiv = 40. 41,10.10.10.3 # NTP # dhcp-xaiv = 44,10.10.10.3, MORDOR # NIS Domain Npe # dhcp-xaiv = 45,10.10.10.3 # NIS Server # dhcp-xaiv = 73,10.10.10.3 # WINS # dhcp-xaiv = 46,8 # NetBIOS datagrams # dhcp-kev xaiv = XNUMX # Ntiv tes neeg rau zaub mov # dhcp-kev xaiv = XNUMX # NetBIOS ntawm dhcp-tso cai # Cov Ntaub Ntawv muaj DHCP hauv subnet # ------------- - --------------------------------------------------------- --- # ----------------------------------------------------- --------------------- # LOGGING tw -f / var / log / syslog lossis ntawv xov xwm -f # ------------ - --------------------------------------------------------- ---- log-lus nug # ----------------------------------------- - ------------------------- # Re A thiab SRV cov ntaub ntawv sib thooj mus rau Cov Lus Qhia Ua Haujlwm # ----------------------------------------- --------------------------
# Ntaub Ntawv A
chaw nyob = / gc._msdcs.mordor.fan / 10.10.10.3 chaw nyob = / DomainDnsZones.mordor.fan / 10.10.10.3 chaw nyob = / ForestDnsZones.mordor.fan / 10.10.10.3

# Microsoft DNS tsam CNAME ntaub ntawv _msdcs.mordor.fan
cname=03296249-82a1-49aa-a4f0-28900f5d256b._msdcs.mordor.fan,sauron.mordor.fan

# SRV cov ntaub ntawv
# srv-tuav = , , , ,

# Thoob Ntiaj Teb Catalog # Microsoft DNS tsam _msdcs.mordor.fan
srv-host = _ldap._tcp.gc._msdcs.mordor.fan, sauron.mordor.fan, 3268,0,0 srv-host = _ldap._tcp.Default-First-Site-Name._sites.gc._msdcs.mordor .fan, sauron.mordor.fan, 3268,0,0
# Microsoft DNS tsam mordor.fan
srv-host = _gc._tcp.mordor.fan, sauron.mordor.fan, 3268,0,0 srv-host = _gc._tcp.Default-First-Site-Name._sites.mordor.fan, sauron.mordor.fan .3268,0,0

# Hloov kho thiab ntiag tug LDAP ntawm Chaw Teev Npe
# Microsoft DNS cheeb tsam _msdcs.mordor.fan
srv-host=_ldap._tcp.Default-First-Site-Name._sites.dc._msdcs.mordor.fan,sauron.mordor.fan,389,0,0
srv-host=_ldap._tcp.dc._msdcs.mordor.fan,sauron.mordor.fan,389,0,0
srv-host=_ldap._tcp.18d3360d-8fdb-40cf-a678-d7c420b6d775.domains._msdcs.mordor.fan,sauron.mordor.fan,389,0,0
srv-host=_ldap._tcp.pdc._msdcs.mordor.fan,sauron.mordor.fan,389,0,0
# Microsoft DNS tsam mordor.fan
srv-host=_ldap._tcp.mordor.fan,sauron.mordor.fan,389,0,0
srv-host=_ldap._tcp.Default-First-Site-Name._sites.DomainDnsZones.mordor.fan,sauron.mordor.fan,389,0,0
srv-host=_ldap._tcp.DomainDnsZones.mordor.fan,sauron.mordor.fan,389,0,0
srv-host=_ldap._tcp.Default-First-Site-Name._sites.mordor.fan,sauron.mordor.fan,389,0,0
srv-host=_ldap._tcp.Default-First-Site-Name._sites.ForestDnsZones.mordor.fan,sauron.mordor.fan,389,0,0
srv-host=_ldap._tcp.ForestDnsZones.mordor.fan,sauron.mordor.fan,389,0,0

#
# KERBEROS hloov kho thiab ntiag tug los ntawm Active Directory
srv-host=_kerberos._tcp.Default-First-Site-Name._sites.mordor.fan,sauron.mordor.fan,88,0,0
srv-host=_kerberos._tcp.mordor.fan,sauron.mordor.fan,88,0,0
srv-host=_kpasswd._tcp.mordor.fan,sauron.mordor.fan,464,0,0
srv-host=_kerberos._udp.mordor.fan,sauron.mordor.fan,88,0,0
srv-host=_kpasswd._udp.mordor.fan,sauron.mordor.fan,464,0,0

# Xaus ntawm /etc/dnsmasq.conf cov ntaub ntawv
# ------------------------------------------------- ------------------

Cia peb tsim cov / etc / banner_add_host file

[hauv paus @ dns ~] # nano / thiab /banner_add_hosts
127.0.0.1 windowsupdate.com 127.0.0.1 ctldl.windowsupdate.com 127.0.0.1 ocsp.verisign.com 127.0.0.1 csc3-2010-crl.verisign.com 127.0.0.1 www.msftncsi.com 127.0.0.1 ipv6.msftncsi.com 127.0.0.1 teredo.ipv6.microsoft.com 127.0.0.1 ds.download.windowsupdate.com 127.0.0.1 download.microsoft.com 127.0.0.1 fe2.update.microsoft.com 127.0.0.1 crl.microsoft.com 127.0.0.1 www. .download.windowsupdate.com 127.0.0.1 win8.ipv6.microsoft.com 127.0.0.1 spynet.microsoft.com 127.0.0.1 spynet1.microsoft.com 127.0.0.1 spynet2.microsoft.com 127.0.0.1 spynet3.microsoft.com 127.0.0.1. 4 spynet127.0.0.1.microsoft.com 5 spynet127.0.0.1.microsoft.com 15 office127.0.0.1client.microsoft.com 127.0.0.1 addons.mozilla.org XNUMX crl.verisign.com

[cag @ dns ~] # dnsmasq --test
dnsmasq: syntax kos OK.

[cag @ dns ~] # systemctl rov pib dua dnsmasq.service 
[hauv paus @ dns ~] # systemctl xwm txheej dnsmasq.service

Cia peb hloov kho cov ntaub ntawv /etc/resolv.conf - Resolver

paus @ dns: ~ # nano /etc/resolv.conf 
sau mordor.fan tshawb mordor.fan

Vim li cas ho tsis peb muaj cov kab li ib txwm tshaj tawm hauv cov ntaub ntawv daws teeb meem.conf? Vim tias peb tshaj tawm hauv Phau Ntawv Maumoos dnsmasq.conf ib cov lus qhia nram qab no:

# Tham nrog Microsoft® DNS server "sauron" yog tias peb # g pub nws khiav
server = / mordor.fan / 10.10.10.3

# Lus nug txog cov npe hauv cheeb tsam yuav teb # ntawm / thiab lwm yam / hosts lossis ntawm DHCP
zos = / mordor.fan /

# Cov lus nug txog PTR lossis Rov Qab cov ntaub ntawv yuav teb # ntawm "dns" thiab "sauron" servers hauv qhov kev txiav txim ntawd
server = / 10.10.10.in-addr.arpa / 10.10.10.5 neeg rau zaub mov = / 10.10.10.in-addr.arpa / 10.10.10.3

Kev nug los ntawm sysadmin.mordor.fan

cov ntaub ntawv /etc/resolv.conf ntawm pab no yog:

buzz @ sysadmin: ~ $ miv /etc/resolv.conf
# Tsim los ntawm NetworkManager nrhiav mordor.fan nameserver 10.10.10.5
buzz @ sysadmin: ~ $ tswv -t Rau spynet4.microsoft.com
spynet4.microsoft.com muaj chaw nyob 127.0.0.1

buzz @ sysadmin: ~ $ tswv -t Rau www.download.windowsupdate.com
www.download.windowsupdate.com muaj chaw nyob 127.0.0.1

Buzz@sysadmin: ~ $ dig dns
buzz @ sysadmin: ~ $ dig dns.mordor.fan
;; COV LUS NUG Lus Nug:; dns.mordor.fan. HAUV A ;; LUS TEB: dns.mordor.fan. 0 HAUV IB 10.10.10.5

buzz @ sysadmin: ~ $ tswv -t SRV _ldap._tcp.gc._msdcs
buzz @ sysadmin: ~ $ tswv -t SRV _ldap._tcp.gc._msdcs.mordor.fan
_ldap._tcp.gc._msdcs.mordor.fan muaj cov ntaub ntawv SRV 0 0 3268 sauron.mordor.fan.

buzz @ sysadmin: ~ $ dig _ldap._tcp.gc._msdcs.mordor.fan
;; COV LUS NUG Nqe Lus Nug:; _ldap._tcp.gc._msdcs.mordor.fan. HAUV A ;; COV LUS TEB nqe: _ldap._tcp.gc._msdcs.mordor.fan. 0 IN A 10.10.10.3

buzz @ sysadmin: ~ $ dig mordor.fan axfr
buzz @ sysadmin: ~ $ dig 10.10.10.in-addr.arpa axfr

Thiab txoj kev ntawd, muaj pes tsawg qhov kev sib tham peb xav tau

Dnsmasq + Active Directory® + Microsoft® Windows Cov Neeg Siv Khoom

Hloov ib qho Microsoft® Windows Cov Neeg Siv Khoom

xya.mordor.fan leem IP chaw nyob:

paus @ dns: ~ # miv /var/lib/misc/dnsmasq.leases 
1488006009 00:0c:29:d6:14:36 10.10.10.115 seven 01:00:0c:29:d6:14:36

Cia peb hloov npe rau lub «xya»-Which tsis koom rau hauv Cov Ntawv Teev Npe Ua Haujlwm- los ntawm«eucalyptus«. Tom qab hloov pauv thiab rov qab pib dua peb tshawb xyuas:

paus @ dns: ~ # miv /var/lib/misc/dnsmasq.leases 
1488006633 00:0c:29:d6:14:36 10.10.10.115 eucaliptus 01:00:0c:29:d6:14:36

Keeb kwm ntawm kev hloov pauv tuaj yeem pom los ntawm "sysadmin":

buzz @ sysadmin: ~ $ tswv -t Ib xya
xya.mordor.fan muaj chaw nyob 10.10.10.115

Tom qab hloov npe

buzz @ sysadmin: ~ $ tswv -t Ib xya
xya tsis muaj ntaub ntawv sau tseg

buzz @ sysadmin: ~ $ host -t A eucaliptus
eucaliptus.mordor.fan muaj chaw nyob 10.10.10.115

Kev nug los ntawm tus neeg siv khoom lag luam eucaliptus.mordor.fan

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Qoob loo.

C: \ Cov neeg siv \ buzz> nslookup
Cov neeg rau zaub mov Default: dns.mordor.fan Chaw Nyob: 10.10.10.5

> sauron
Neeg rau zaub mov: dns.mordor.fan Chaw Nyob: 10.10.10.5 Lub Npe: sauron.mordor.fan Chaw Nyob: 10.10.10.3

> mordor.fan
Neeg rau zaub mov: dns.mordor.fan Chaw Nyob: 10.10.10.5 Lub Npe: mordor.fan Chaw Nyob: 10.10.10.3

> eucalyptus
Neeg rau zaub mov: dns.mordor.fan Chaw Nyob: 10.10.10.5 Lub Npe: eucaliptus.mordor.fan Chaw Nyob: 10.10.10.115

> 03296249-82a1-49aa-a4f0-28900f5d256b._msdcs.mordor.fan
Neeg rau zaub mov: dns.mordor.fan Chaw Nyob: 10.10.10.5 Npe: sauron.mordor.fan Chaw Nyob: 10.10.10.3 Aliases: 03296249-82a1-49aa-a4f0-28900f5d256b._msdcs.mordor.fan

> teeb hom = SRV
> _kerberos._udp.mordor.fan
Server: dns.mordor.fan Chaw Nyob: 10.10.10.5 _kerberos._udp.mordor.fan SRV qhov chaw pabcuam: qhov tseem ceeb = 0 qhov hnyav = 0 chaw nres nkoj = 88 svr hostname = sauron.mordor.fan sauron.mordor.fan qhov chaw nyob hauv internet = 10.10.10.3. XNUMX

> _ldap._tcp.18d3360d-8fdb-40cf-a678-d7c420b6d775.domains._msdcs.mordor.fan
Server: dns.mordor.fan Chaw Nyob: 10.10.10.5 _ldap._tcp.18d3360d-8fdb-40cf-a678-d7c420b6d775.domains._msdcs.mordor.fan SRV qhov chaw pabcuam: qhov tseem ceeb = 0 hnyav = 0 chaw nres nkoj = 389 svr hostname = sauron .mordor.fan sauron.mordor.fan qhov chaw nyob hauv internet = 10.10.10.3

> tawm

C: \ Cov neeg siv \ buzz>

Cov neeg siv Windows rau npe hauv Microsoft® DNS

Cov Neeg Siv Khoom Windows Tsis Koom Rau Hauv Cov Lus Qhia Tseem Ceeb

Peb yuav tsum kuaj xyuas yog tias IP chaw xauj los ntawm qhov sib txawv Windows cov neeg siv los ntawm Dnsmasq tau tso npe rau hauv Microsoft® DNS. Nws tuaj yeem cuam tshuam tau txoj kev peb qhib Dynamic Hloov Tshiab - Kev hloov kho kho tshiab hauv Microsoft ® DNS Zones ntawm Active Directory®. Peb pib los ntawm lub neej tsis teeb tsa ntawm Microsoft DNS uas tso cai nkaus xwb Kev Raug Hloov kho Dynamic - Kev hloov kho ntxiv -> Kev ruaj ntseg nkaus xwb, nyob rau hauv txhua tus ntawm nws Thaj Chaw.

Nco ntsoov tias tus neeg siv nrog lub sijhawm tam sim no FQDN eucaliptus.mordor.fan tsis muaj yog txuas rau Active Directory Domain (lossis Samba4 AD-DC), thiab yog ib qho kev zam rau Microsoft txoj cai uas «Tsuas yog cov neeg muas zaub sau npe hauv Kuv Tus Thawj Yuav tau txais kev tso cai los ntawm Kuv Tus Hloov Tshiab Kev Siv-Kuv tsuas yog paub- sau npe hauv kuv tus DNS«. Yam zoo uas yog Samba4 AD-DC tau qhia peb qee yam txog nws.

eucaliptus.mordor.fan daim ntawv xauj tsev IP 10.10.10.115:

buzz @ sysadmin: ~ $ host -t A eucaliptus
eucaliptus.mordor.fan muaj chaw nyob 10.10.10.115

Peb hloov nws lub npe rau «mahogany«, Cia peb pib dua lub Windows 7, thiab saib yuav muaj dab tsi tshwm sim thaum peb nug cov npe«eucalyptus»Thiab«mahogany»Rau txhua tus ntawm DNS, thawj zaug rau Microsoft DNS thiab tom qab ntawd rau Dnsmasq:

buzz @ sysadmin: ~ $ tswv -t A eucaliptus.mordor.fan 10.10.10.3
Kev siv lub npe server: Lub Npe: 10.10.10.3 Chaw Nyob: 10.10.10.3 # 53 Aliases: 

Tus tswv tsev eucaliptus.mordor.fan tsis pom: 3 (NXDOMAIN)

buzz @ sysadmin: ~ $ tswv -t A mahogany.mordor.fan 10.10.10.3
Kev siv lub npe server: Lub Npe: 10.10.10.3 Chaw Nyob: 10.10.10.3 # 53 Aliases: 

Tus tswv tsev mahogany.mordor.fan tsis pom: 3 (NXDOMAIN)

buzz @ sysadmin: ~ $ tswv -t A eucaliptus.mordor.fan 10.10.10.5
Kev siv lub npe server: Lub Npe: 10.10.10.5 Chaw Nyob: 10.10.10.5 # 53 Aliases: 

Tus tswv tsev eucaliptus.mordor.fan tsis pom: 3 (NXDOMAIN)

buzz @ sysadmin: ~ $ tswv -t A mahogany.mordor.fan 10.10.10.5
Kev siv lub npe server: Lub Npe: 10.10.10.5 Chaw Nyob: 10.10.10.5 # 53 Aliases: 

mahogany.mordor.fan muaj chaw nyob 10.10.10.115

Peb tuaj yeem hloov lub npe rau Windows 7 tus thov kev pab ntawd tsis muaj yog txuas nrog Tus Tuav mordor.fan ntawm Active Directory Active ntau zaus raws li qhov peb xav tau, tias Microsoft® DNS tsis pom txog cov kev hloov no lossis cov neeg siv ntawd muaj. Nws puas yog tias nws tsuas yog vim peb tau xaiv cov kev xaiv  Kev hloov kho ntxiv -> Kev ruaj ntseg nkaus xwb hauv txhua Thaj Chaw ntawm Micorosft DNS?.

Txhawm rau Mr. Microsoft® DNS kom paub txog cov kev hloov pauv, peb yuav tsum xaiv Kev hloov kho tshiab -> Nonsecure thiab ruaj ntsegCov. Qhov kev xaiv no, Nyob Zoo Cov Neeg Nyeem, cuam tshuam txog qhov kev tiv thaiv qhov tseem ceeb ntawm kev ruaj ntseg ntawm ib qho Seem Tuam Txhab Npe uas raug hwm, yog nws Microsft® lossis UNIX® / Linux. Lub Microsoft® DNS ceeb toom txog qhov tsis muaj zog vim tias thaum kawg nws tsis muaj ib yam dab tsi ntau tshaj li qhov hloov kho thiab ntiag tug los muab pebKev Ruaj Ntseg rau Tsaus Ntuj«. Yog tias tsis yog, vim li cas koj thiaj li xav kom txuag ntawm koj lub npe nrov sau npe tag nrho DNS chaw thiab cov ntaub ntawv ntawm koj Microsoft® DNS thaum peb siv ua cov haujlwm "Active Directory®?" Ntxiv rau kev txhawb nqa yam tsis muaj kev nyab xeeb rau Microsoft® DNS, kev hloov kho hauv qab no yog tseev kom muaj nyob rau hauv Windows 7 cov neeg siv daim npav network teeb tsa:

 

Cia peb kuaj xyuas:

buzz @ sysadmin: ~ $ tswv -t A mahogany.mordor.fan 10.10.10.3
Siv tus tswv sau npe: Npe: 10.10.10.3 Chaw Nyob: 10.10.10.3 # 53 Aliases: caoba.mordor.fan muaj chaw nyob 10.10.10.115

buzz @ sysadmin: ~ $ tswv 10.10.10.115 10.10.10.3
Siv cov ntawv sau rau npe: Lub Npe: 10.10.10.3 Chaw Nyob: 10.10.10.3 # 53 Aliases: 115.10.10.10.in-addr.arpa domain npe pointer mahogany.mordor.fan.

buzz @ sysadmin: ~ $ tswv -t A mahogany 10.10.10.5
Siv tus tswv sau npe: Npe: 10.10.10.5 Chaw Nyob: 10.10.10.5 # 53 Aliases: caoba.mordor.fan muaj chaw nyob 10.10.10.115

buzz @ sysadmin: ~ $ tswv 10.10.10.115 10.10.10.5
Siv cov ntawv sau rau npe: Lub Npe: 10.10.10.5 Chaw Nyob: 10.10.10.5 # 53 Aliases: 115.10.10.10.in-addr.arpa domain npe pointer mahogany.mordor.fan.

Yog tam sim no. Dab tsi zoo synchronism rau ob lub DNS servers tsis synchronized los ntawm kev txhais tau tias!

Cov Neeg Siv Khoom Siv Windows Koom Nrog Active Directory ®

Peb koom siab rau tus neeg siv khoom mahogany.mordor.fan mus rau Tus Thawj, tab sis tsis tau ua ntej tshem tawm cov kev hloov kho uas peb tau ua hauv kev teeb tsa ntawm koj daim npav network, yog tias lub sijhawm twg los peb tau ua nws los txheeb xyuas cov ntsiab lus ntawm tshooj dhau los. Kuj rho tawm qhov nkag rau «mahogany»Hauv Microsoft® DNS, thiab xa rov qab Dynamic Hloov Tshiab rau lawv lub ntsiab lus ntawm keeb kwm ntawm «Ruaj ntseg nkaus xwb«. Los ntawm txoj kev, nws siv tau los rov pib lub Microsoft pabcuam® DNS.

Tom qab koom nrog Cov Thawj, thiab txawm hais tias tag nrho peb cov kev siv zog, cov neeg siv «mahogany»Tsis zwm rau hauv Microsoft® DNS. Peb twb tshaj tawm nyob hauv Phau Ntawv Maumoos dnsmasq.conf ib -Txheej- tias thawj DNS server yog 10.10.10.3.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Qoob loo.

C: \ Cov neeg siv saruman> ipconfig / txhua

Windows IP Kho Kom Zoo Nkauj Lub Npe. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : MAHOGANY Primary Dns Suffix. Cov. Cov. Cov. Cov. Cov. Cov. : mordor.fan Ntawm Hom. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : Hybrid IP Routing Siv. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : Tsis Txhob Siv WINS Tso Cai. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : Tsis Yog Cov Ntaub Ntawv DNS Suffix Tshawb Nrhiav. Cov. Cov. Cov. Cov. Cov. : mordor.fan Ethernet adapter Hauv Cheeb Tsam Kev Txuas Hauv Cheeb Tsam: Kev sib txuas tshwj xeeb DNS Suffix. : mordor.fan Cov lus piav qhia. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : Intel (R) PRO / 1000 MT Network Txuas Txuas Hluav Taws Xob Chaw Nyob. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : 00-0C-29-D6-14-36 DHCP Siv Rau. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : Yog Autoconfiguration Siv Tau. Cov. Cov. Cov. : Yog Txuas-hauv IPv6 Chaw Nyob. Cov. Cov. Cov. Cov. : fe80 :: 352a: b954: 7eba: 963e% 12 (Xav Tau) IPv4 Chaw Nyob. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : 10.10.10.115 (Xav Tau) Subnet Mask. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : 255.255.255.0 Daim Ntawv Xauj Tsev Tau Txais. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : Saturday, Lub Ob Hlis 25, 2017 8:19:05 AM Daim Ntawv Xev Nrawm. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : Saturday, Lub Ob Hlis 25, 2017 4:20:36 PM Rooj Plaub Tog. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : 10.10.10.253 DHCP Neeg rau zaub mov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : 10.10.10.5 DHCPv6 IAID. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : 251661353 DHCPv6 Qhwv DUID. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : 00-01-00-01-20-3B-69-81-00-0C-29-D6-14-36

   DNS Servers. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : 10.10.10.3
                                       10.10.10.5
   NetBIOS dhau Tcpip. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : Enable Qhov adapter isatap.mordor.fan: Media Xeev. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : Media disconnected Connection-specific DNS Suffix. : mordor.fan Cov lus piav qhia. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : Microsoft ISATAP Adapter Qhov Chaw Nyob Lub Cev. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : 00-00-00-00-00-00-00-E0 DHCP Enabled. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : Tsis muaj Autoconfiguration Muaj Tsis Txaus. Cov. Cov. Cov. : Yog Qhov Qhov Txuas Rau Hauv Cheeb Tsam Chaw Sib Txuas * 9: Media Xeev. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : Media disconnected Connection-specific DNS Suffix. Cov lus piav qhia. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : Microsoft Teredo Qhov Chaw Siv Khoom Siv Khoom Siv Hluav Taws Xob Chaw Nyob. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : 00-00-00-00-00-00-00-E0 DHCP Enabled. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. Cov. : Tsis muaj Autoconfiguration Muaj Tsis Txaus. Cov. Cov. Cov. : Thiab nws yog

C: \ Cov siv \ saruman>

buzz @ sysadmin: ~ $ tswv -t A mahogany.mordor.fan 10.10.10.3
Kev siv cov npe server: Lub Npe: 10.10.10.3 Chaw Nyob: 10.10.10.3 # 53 Aliases: Host caoba.mordor.fan tsis pom: 3 (NXDOMAIN)

Buzz@sysadmin: ~ $ host -t Rau mahogany.mordor.fan
mahogany.mordor.fan muaj chaw nyob 10.10.10.115
  • Tib txoj kev rau cov neeg siv sau npe «mahogany»Hauv qhov Microsft® DNS tab tom hloov koj daim npav network raws li qhiaó hauv daim duab dhau los, uas yog, qhia meej tias: DNS cov ntawv teev lus rau kev sib txuas yog mordor.fan, tias nws sau npe rau kev sib txuas chaw nyob hauv DNS, thiab tias nws siv cov ntawv tshaj tawm DNS thaum sau npe qhov kev sib txuas..
buzz @ sysadmin: ~ $ tswv -t A mahogany.mordor.fan 10.10.10.3
Siv tus tswv sau npe: Npe: 10.10.10.3 Chaw Nyob: 10.10.10.3 # 53 Aliases: caoba.mordor.fan muaj chaw nyob 10.10.10.115

buzz @ sysadmin: ~ $ tswv -t A mahogany.mordor.fan
mahogany.mordor.fan muaj chaw nyob 10.10.10.115
Cia hloov lub npe ntawm "mahogany" rau "cedar"
buzz @ sysadmin: ~ $ tswv -t A mahogany.mordor.fan 10.10.10.3
Kev siv cov npe server: Lub Npe: 10.10.10.3 Chaw Nyob: 10.10.10.3 # 53 Aliases: Host caoba.mordor.fan tsis pom: 3 (NXDOMAIN)

buzz @ sysadmin: ~ $ tswv -t To cedar.mordor.fan 10.10.10.3
Siv tus tswv sau npe: Npe: 10.10.10.3 Chaw Nyob: 10.10.10.3 # 53 Aliases: cedro.mordor.fan muaj chaw nyob 10.10.10.115

buzz @ sysadmin: ~ $ tswv -t A mahogany.mordor.fan 10.10.10.5
Kev siv cov npe server: Lub Npe: 10.10.10.5 Chaw Nyob: 10.10.10.5 # 53 Aliases: Host caoba.mordor.fan tsis pom: 3 (NXDOMAIN)

buzz @ sysadmin: ~ $ tswv -t To cedar.mordor.fan 10.10.10.5
Siv tus tswv sau npe: Npe: 10.10.10.5 Chaw Nyob: 10.10.10.5 # 53 Aliases: cedro.mordor.fan muaj chaw nyob 10.10.10.115

Thiab txhua qhov kev coj ua, raws li cov neeg siv Microsoft thiab Microsoft® DNS nyiam ib yam.

Peb koom tes nrog Microsoft® DHCP thiab Microsoft® DNS

Nyob Zoo Txog Cov Neeg Nyeem, tshooj no yog tawm ntawm lub ntsiab lus ntawm lub blog tau mob siab rau Dawb Software. Saib Microsoft® kev pab. Lawv tsis ntseeg ?. 😉

SIB THAM

Muaj ntau txoj hauv kev los ua haujlwm nrog Microsoft® DNS thaum peb ua kom nws nyob ua ke hauv SME Network nrog Dnsmasq. Ntawm lawv peb yuav hais tsuas yog cov hauv qab no:

  • Ua kom tiav qhov kev pabcuam Microsoft® DNS ntawm lub koos pij tawj uas nws tseem khiav, qhia tom qab pib qhov kev pabcuam tau ua tsis taus. Tsis kos rau hauv kev teeb tsa ntawm daim npav network ntawm txhua Microsoft® tus thov kev pabcuam xaiv los sau npe chaw nyob ntawm kev sib txuas hauv DNS. Tshem tawm ntawm cov ntaub ntawv /etc/dnsmasq.conf Qhia server = / mordor.fan / 10.10.10.3. Sau ntawv:
    • Txawm tias cov lus nug txog cov ntaub ntawv tsis teb SOA y NS, lub network yuav ua haujlwm kom raug, nrog rau kev sib koom ua ke ntawm cov neeg sib txawv -Microsoft® thiab Linux- mus rau Active Directory® Domain.
    • Nws muaj qhov kom zoo dua uas nyob rau hauv SME LAN yuav tsuas muaj ib Daim Ntawv Teev Npe Server -machote- thiab nws yuav yog Dnsmasq. ;-). Ntawm qhov tod tes, muaj peev xwm tsis sib haum xeeb ntawm cov ntaub ntawv DNS khaws cia hauv Microsoft® DNS thiab cov muaj los ntawm Dnsmasq yog tshem tawm.
  • Tseg Microsoft® DNS khiav los teb cov lus nug DNS nkaus xwb txog SOA thiab NS cov ntaub ntawv. Ceeb tooms:
    • Hloov kho cov qauv ntawm daim npav network ntawm txhua tus neeg siv Windows, xaiv qhov kev xaiv los cuv npe qhov chaw nyob sib txuas hauv DNS.
    • Peb xav hais tias cov tshuaj no yog pov tseg ntawm cov peev txheej.
  • Kho cov kev pabcuam raws li peb tau pom thoob plaws hauv tsab xov xwm, uas qhia tau hais tias muaj kev daws teeb meem ntau dua li qhov nyiam Microsoft the kev xav-tsis tau FreeBSD / Linux- Ok ?.

Abstract

  • Daim ntawv thov Microsoft proposal DNS yog kaw heev. Nws tawm hauv chav tsis muaj lwm txoj kev daws teeb meem uas tsis ua raws li nws qhov kev xav ntawm hermetic.
  • Niam Xwm qhia peb tias peb muaj nyob hauv ntau lub ntiaj teb. Qhov qub yog kom muaj kev sib xyaw LAN, tsiv mus rau Free Software, thiab muaj kev nplua nuj nyob hauv lub neej thiab ntau yam.
  • Nws zoo nkaus li tias rau Microsoft®, cov neeg yuav khoom uas tsis Koom nrog Nws Qhov Haujlwm yog Outcasts, thiab yog li ntawd yuav tsum tsis txhob thab coj lawv mus rau hauv kev txiav txim siab.
  • Nyuaj npaum li cas yog tau ua hauj lwm nrog Private Software! Kuv xum siv sijhawm me ntsis ntawm kev ua haujlwm teeb tsa Free Software thiab yog pub dawb tiag tiag, damn nws!

"Qhov Kev Ntsuas Zoo Tshaj Plaws Qhov tseeb yog Kev Coj Ua."


Cov ntsiab lus ntawm tsab xov xwm ua raws li peb cov ntsiab cai ntawm kev tswj hwm kev ncaj nceesCov. Tshaj tawm ib qho yuam kev nyem no.

11 lus, tawm koj li

Tso koj saib

Koj email chaw nyob yuav tsis tsum luam tawm. Yuav tsum tau teb cov cim nrog *

*

*

  1. Lub luag haujlwm rau cov ntaub ntawv: Miguel Ángel Gatón
  2. Lub hom phiaj ntawm cov ntaub ntawv: Tswj SPAM, kev tswj xyuas tawm tswv yim.
  3. Sau raws cai: Koj kev tso cai
  4. Kev sib txuas lus ntawm cov ntaub ntawv: Cov ntaub ntawv yuav tsis raug xa mus rau lwm tus neeg thib peb tsuas yog los ntawm kev txiav txim siab raug cai.
  5. Cov ntaub ntawv khaws cia: Cov Ntaub Ntawv khaws tseg los ntawm Occentus Networks (EU)
  6. Txoj Cai: Txhua lub sijhawm koj tuaj yeem txwv, rov qab thiab tshem tawm koj cov ntaub ntawv.

  1.   Zodiac Carburus said

    Zoo kawg li tsab xov xwm koj tau sau, Federico!

  2.   Julio Leon said

    Zoo kawg li hauv zaj lus kuv tus hlub. Thiab cov lus xaus yog qhov zoo tshaj plaws XD
    Sldos;

  3.   nab qa dev said

    Kuv tsis xav tias kuv tau pom ib qho kev qhia tiav thiab cov ncauj lus kom ntxaws ntxiv rau sysadmin hauv is taws nem (hauv lus Spanish), kev ua haujlwm uas koj ua hauv Networks rau SMEs yog ua haujlwm.

    Txawm hais tias qhov kev ua haujlwm nyuaj thiab ncav cuag qhov theem ntawm kev nthuav dav yog qhov teeb meem ntawm ntau lub sijhawm, Kuv ntseeg tias koj tab tom tsim cov ntsiab lus siv uas yuav siv raws li nws tau paub los ntawm ntau tus ntawm SysAdmin uas muaj qhov tseem ceeb hauv koj cov kws qhia ntawv rau ntau yam haujlwm uas nws ntsib txhua hnub.

    Raws li rau dnsmasq thiab cov ntawv qhia nquag, Kuv xav tias kuv tsis tau muaj sijhawm los ua haujlwm nrog ob qho tib si, tab sis hauv kuv chav kuaj, thaum tsis muaj lub qhov rais cov neeg siv khoom, txhua yam zoo li tau zoo, thiab nws tsis muaj kev xav nrog cov kauj ruam no zoo kawg nkaus los ntawm kauj ruam.

    Cawm koj cov lus «Yuav nyuaj npaum li cas rau kev ua hauj lwm nrog Private Software !. Kuv xav siv sijhawm me ntsis ntawm kev ua haujlwm kho lub Software dawb thiab yog qhov kev ywj pheej tiag, tsim kev puas tsuaj rau nws! » qhov kev hloov kho tshiab ntawm tib neeg software dawb.

    Pab kev zoo siab FIco… Peb tsiv mus.

  4.   federico said

    Zodiac: Koj cov lus yog kev txhawb siab kom sau ntawv. Tsis txhob tos, ntau lub sijhawm zoo - lub pob tw yog qhov tsim nyog los sau ib tsab xov xwm tus qauv zoo li no.

    Julio León: Kev txais tos rau koj thiab, Julio nyob zoo. Vam thiab koj mus txuas ntxiv nrog peb ntawm txoj kev paub me ntsis ntxiv txog Free Software.

    Lub Ntsej Muag: Cov hnub thiab cov sij hawm siv tau zoo tsim nyog nws thaum kuv nyeem cov lus zoo ib yam li cov uas nyob hauv cov ntawv tshaj tawm no. Lawv yog tus nqi zog zoo tshaj rau peb cov haujlwm. Kuv dhau txoj kab ntawv txuas rau kab lus rau Simon Kelley nws tus kheej thiab nws ua siab zoo los teb kuv.

    Kuv xav tau kom zoo dua qhov chaw no hais tias hauv qhov teeb meem DNS thiab DHCP peb pib - los ntawm cov tswv yim - los ntawm cov nyom mus rau qhov yooj yim. Dnsmasq yog ib qho kev daws teeb meem zoo rau SME Networks, thiab nws yooj yim dua los siv dua li BIND + Isc-Dhcp-Server duo. Cov ncauj lus yuav zoo li me ntsis txuj ci rau ntau tus nyeem. Nrog rau lub sijhawm thiab kev xyaum lawv yuav paub tias qhov no tsis yog qhov teeb meem. Nws yog qhov tsim nyog kawm cov Ntsiab Lus ntawm Cov Txheej Txheem Kev Ua Zoo Tshaj Plaws, ib lub npe uas yuav nkag ua 6 daim ntawv sau txog kev pabcuam DNS thiab DHCP, tsis nco qab NTP.

    Pab kev zoo siab rau txhua tus… Peb mus!

  5.   IWO said

    Ua tsaug Federico rau lwm tsab xov xwm zoo kawg li nrog kev nthuav dav zoo nkauj thiab kev tshawb pom dav dav txog Dnsmasq, lub cuab tam uas peb twb pom lawm tsis tshua muaj txiaj ntsig rau sysadmins.

    ZOO kawg txhua yam ntsig txog ntxig rau Microsoft DNS tsam "_msdcs.mordor.fan" rau hauv koj /etc/dnsmasq.conf teeb tsa cov ntaub ntawv los ntawm nws cov SRV cov ntaub ntawv uas siv cov kev pabcuam: _gc, _ldap, _kerberos thiab _kpasswd nrog lub hom phiaj ntawm kev siv Microsoft DNS ( "server = / mordor.fan / 10.10.10.3" cov lus qhia) ntxiv rau Dnsmasq ("local = / mordor.fan /" nqe lus) los daws cov lus nug DNS.

    GREAT tseem yog tus piv txwv tau tsim tias rau Microsoft DNS los sau npe cov neeg siv Windows nrog IP hloov ntawm LAN, koj yuav tsum xaiv nyob rau hauv DNS kev teeb tsa, "Dynamic updates" li "Nonsecure thiab ruaj ntseg" thiab dab tsi uas cuam tshuam rau hauv qhov tsis ruaj ntawm kev ruaj ntseg ntawm txhua Tus Tsim Npe Lub Tuam Txhab uas tau hwm, yog nws Microsoft lossis UNIX / Linux. Dhau li yog qhov tsim nyog hloov kho nyob rau hauv teeb tsa ntawm lub Windows client network card.
    Tsis muaj ib yam dab tsi nrog txhua daim ntawv tshiab koj nce lub nres! Mob siab tiag tos rau cov ntawv tom ntej!

    1.    federico said

      Ua tsaug ntau rau koj qhov kev ntsuam xyuas thiab kev tawm tswv yim, IWO. Hauv txhua tsab xov xwm kuv tshaj tawm, Kuv ib txwm tos koj lub tswv yim, vim nws yog kev txhawb nqa los ntawm koj txoj haujlwm, kev paub thiab kev coj ua. Pab kev zoo siab IWO. Peb yuav pom koj nyob hauv tsab xov xwm tom ntej

  6.   dhunter said

    Txoj haujlwm zoo heev, raws li ib txwm tso cov gems no rau sysadmins. Tsaug ib txhiab!

  7.   kev 88 said

    Muab sijhawm rau Microsoft lub DNS, koj tsis tseem cia nws qhia. Peb tsis paub tias xyov nws puas tseem muaj txoj sia nyob los yog txawm hais tias nws muaj qhov txaj muag cia. Tshooj lus zoo.

  8.   HLO 2 Gi said

    Ib lub pob zeb diamond zoo li tsis muaj lwm yam, tau khaws tseg hauv cov nyiam rau kev sib tham. Tshooj lus zoo.

  9.   federico said

    Ua tsaug HO2Gi rau koj qhov kev ntsuas. Kuv xav kom koj-thiab feem ntau rau TXHUA TUS- mus ntsib https://blog.desdelinux.net/redes-computadoras-las-pymes-introduccion/Cov. Nws tau rov qab kho dua nrog kev ntsuas ntawm tag nrho cov ntawv tshaj tawm thiab cov ncauj lus yuav tsum tau sib tham. Txais tos thiab txuas ntxiv nrog peb.

  10.   Pablo Andrés Flemmer said

    Cov ntawv zoo ib yam li daim uas muaj nyob hauv https://blog.desdelinux.net/bind-active-directory/
    Kuv tsuas yog xav ua qhov kev pom zoo xwb, thiab thov siv nws qhov kev thuam tsim kho; Txhawm rau piv txwv cov txheej txheem, nws yuav zoo dua yog tias tsis siv 10.10.10.0/24 network, Kuv tau siv ib qho twg txhua ntu muaj ntau tus lej sib txawv, xws li 192.168.1.0/24 network.
    Qhov no yuav qhia meej cov ntsiab lus uas cov chaw nyob hauv network mus rov qab, xws li thaum koj yuav tsum ntxiv cov txiaj ntsig ntawm hom ".in-addr.arpa"
    Ua tsaug uas koj tau qhia me ntsis rau cov zoo paub.
    Qhov zoo tshaj plaws.