DNS thiab DHCP hauv CentOS 7 - SMB Networks

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

Nyob zoo cov phooj ywg !. Peb yuav pom hauv tsab xov xwm no yuav ua li cas peb tuaj yeem ua tus khub tseem ceeb ntawm cov kev pab cuam rau kev sib koom tes los ntawm DNS thiab DHCP ntawm CentOS - Linux, tshwj xeeb hauv nws version 7.2.

  • Qee cov ntsiab lus hais txog DNS xa mus rau qhov tseeb tias kev siv ntawm kev ua haujlwm no yog qhov tsis meej thiab nyuaj. Kuv tsis pom zoo nrog cov lus ntawd. Kuv xav hais tias nws yog lub tswv yim me ntsis thiab ntau yam ntawm nws cov ntaub ntawv config muaj fussy syntax. Hmoov zoo, peb muaj cov cuab yeej los soj ntsuam, ib qib zuj zus, qhov syntax ntawm cov ntaub ntawv teeb tsa uas peb hloov kho. Yog li, peb yuav sim ua kom nyeem cov ntawv no zoo li txaus siab thiab txaus siab npaum li ua tau..

Rau cov neeg uas tab tom nrhiav qhov pib ntawm ob qho kev pabcuam, peb xav kom pib nrhiav koj li kev tshawb hauv Wikipedia, ob phau ntawv ua lus Spanish thiab Askiv. Nws tsis yog tsawg dua tias cov lus hauv Lus Askiv yuav luag txhua tus ua kom tiav thiab kev sib txuam. Tseem, Wikipedia yog qhov pib zoo heev.

Rau nej cov uas xav paub txog DNS thiab KHI, peb xav nyeem phau ntawv «OReilly - DNS thiab KHWV 4ed"sau los ntawm Paul albitz y Kab Ciav Xaj Liu, lossis tom qab ntawv luam tawm uas muaj tseeb.

Peb twb tau luam tawm ib tsab xov xwm ntawm cov npe hu ua «DNS thiab DHCP hauv openSUSE 13.2 Harlequin - Networks»Rau cov neeg nyiam ntawm daim duab ib puag ncig. Txawm li cas los xij, txij tam sim no rau lawv yuav tau ntsib nrog cov ntawv sau ntawm cov ncauj lus no - tsis yog rau lwm tus- sau nrog ntau siv ntawm lub emulator ntawm lub davhlau ya nyob twg lossis console. Wow, nyob rau hauv cov style qub tau siv los ntawm UNIX® / Linux System Cov Thawj Coj.

Yog tias koj xav paub ntau ntxiv txog lub npe lub npe ntawm kab lus no «Kev tes hauj lwm SME»Koj tuaj yeem mus ntsib nplooj ntawv hauv blog no«Cov tes hauj lwm SME: thawj txiav virtual«. Hauv nws koj yuav pom cov kev txuas rau ntau lwm cov ntawv luam tawm.

  • Tom qab kev teeb tsa ntawm CentOS 7 Kev Ua Haujlwm Kev Ua Haujlwm tiav nrog cov pob peb pom zoo, el Cov ntawv qhia /usr/share/doc/bind-9.9.4/ Nws muaj cov nqi zoo ntawm cov ntaub ntawv uas peb xav kom koj sab laj ua ntej muag khoom rau kev tshawb fawb hauv Is Taws Nem yam tsis muaj kev paub ua ntej, ntawm koj lub ntsis ntiv tes thiab hauv koj lub tsev, koj tuaj yeem nrhiav qhov koj tab tom nrhiav.

Puag system kev teeb tsa

Cov ntaub ntawv dav dav ntawm tus sau thiab DNS server

Sau npe: desdelinux.fan
DNS server npe: dns.fromlinux.fan
IP chaw nyob: 192.168.10.5
Daim npog qhov ncauj: 255.255.255.0

Nruab Nruab

Peb pib nrog kev teeb tsa tshiab lossis huv kev ua haujlwm ntawm CentOS 7 kev ua haujlwm raws li tau hais hauv tsab xov xwm dhau los «CentOS 7 Hypervisor I - SMB Networks«. Peb tsuas yog yuav tsum tau hloov ua cov hauv qab no:

  • Nyob hauv 22 duab «SOFTWARE XAIV«, Peb pom zoo xaiv nyob rau sab laug«Ib puag ncig puag ncig»Cov kev xaiv uas sib haum rau ib«Infrastructure neeg rau zaub mov«, Thaum nyob rau hauv txoj cai kem«Plugins rau Xaiv Ib puag ncig»Xaiv lub thawv«DNS npe neeg rau zaub mov«. Peb yuav nruab DHCP server tom qab.
  • Cia peb nco qab cov lus tshaj tawm ntawm cov chaw txuas ntxiv uas tau hais hauv 23 duab, tom qab teeb tsa lub «NETWORK & TEAM LUB NPE".
  • Cov duab xa mus rau cov partitions uas peb yuav tsim ntawm peb lub hard drive tsuas yog muab raws li kev qhia. Xav tias dawb los xaiv cov partitions raws li koj qhov kev txiav txim siab, kev coj ua, thiab kev txiav txim siab zoo.
  • Thaum kawg, hauv lub Duab 13 «NETWORK & TEAM LUB NPE», peb yuav tsum hloov cov nqi raws li cov kev ntsuas dav dav ntawm kev tshaj tawm sau npe thiab DNS server, yam tsis nco qab qhia lub tsev npe-hauv cov ntaub ntawv no «dns«- tom qab lub network kev teeb tsa tiav lawm. Nws yog qhov zoo los ua ping -Thov lwm tus tswv- mus rau qhov chaw nyob IP tom qab lub network nquag:

DNS thiab DHCP ntawm CentOS

Muaj ntau tsawg heev thiab pom tseeb qhov kev hloov pauv uas peb yuav tsum ua nrog rau kev sau ntawv dhau los.

Kev kuaj xyuas thiab pib kho

Tom qab peb nruab qhov kev khiav hauj lwm peb yuav tsum xyuas cov ntaub ntawv hauv qab no tsawg kawg, thiab rau qhov no peb pib sib kho ntawm SSH los ntawm peb lub khoos phis tawm sysadmin.fromlinux.fan:

buzz @ sysadmin: ~ $ ssh 192.168.10.5
buzz@192.168.10.5 tus lej sau npe: nkag thaum kawg: Sat Jan 28 09:48:05 2017 txij 192.168.10.1
[buzz @ dns ~] $

Kev ua haujlwm saum toj saud yuav siv sijhawm ntev dua li ib txwm, thiab nws yog vim li ntawd vim peb tseem tsis tau muaj DNS ntawm LAN. Rov kuaj xyuas tom qab ntawd tias DNS ua haujlwm.

[buzz @ dns ~] $ miv / thiab / cov tswv
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 :: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6

[buzz @ dns ~] $ miv / thiab lwm yam / hostname
dns

[buzz @ dns ~] $ miv / thiab / sysconfig / network-ntawv / / ifcfg-eth0
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eth0
UUID=946f5ac9-238a-4a94-9acb-9e3458c680fe
DEVICE=eth0
ONBOOT=yes
IPADDR=192.168.10.5
PREFIX=24
GATEWAY=192.168.10.1
DNS1=127.0.0.1
DOMAIN=desdelinux.fan

[buzz @ dns ~] $ miv /etc/resolv.conf 
# Tsim los ntawm NetworkManager nrhiav los ntawm linux.fan nameserver 127.0.0.1

Qhov kev teeb tsa tseem ceeb tau teb rau peb cov kev xaiv. Nco ntsoov tias txawm nyob ntawm tus neeg rau zaub mov Kaus mom 7 - CentOS 7, yog teeb tsa los ntawm lub neej ntawd thaum NetworkManager yog li qhov no yog tus uas tswj hwm lub network cuam tshuam, puas yog lawv xaim xaim xaim lossis wireless (WiFi), VPN sib txuas, PPPoE kev sib txuas, thiab lwm yam kev sib txuas hauv network.

[buzz @ dns ~] $ sudo systemctl xwm txheej networkmanager
[sudo] password rau buzz: ● networkmanager.service Loaded: tsis pom (Vim li cas: Tsis muaj cov ntaub ntawv lossis phau ntawv sau npe) Ua haujlwm: tsis tsaug zog (tuag lawm)

[buzz @ dns ~] $ sudo systemctl xwm txheej NetworkManager
● NetworkManager.service - Tus Thawj Tswj Haujlwm Network Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; tus neeg muag khoom preset: ua kom tiav) Nquag: nquag (khiav haujlwm) txij li Sat 2017-01-28 12:23:59 EST; 12min dhau los Main PID: 705 (NetworkManager) CGroup: /system.slice/NetworkManager.service └─705 / usr / sbin / NetworkManager --no-daemon

Lub kaus mom liab - CentOS kuj tso cai rau koj txuas thiab cuam tshuam lub network cuam tshuam nrog kev siv cov lus txib qub upup e ifdownCov. Wb khiav ntawm lub console console:

[hauv paus @ dns ~] # ifdown eth0
Ntaus ntawv 'eth0' ntse tiav.

[hauv paus @ dns ~] # ifup eth0
Kev sib txuas qhib tau ua tiav zoo (D-Bus nquag txoj kev: / org / freedesktop / NetworkManager / ActiveConnection / 1)
  • Peb xav kom tsis txhob hloov lub chaw pib uas CentOS 7 muaj nrog rau kev hwm NetworkManager.

Peb tau tshaj tawm tshaj tawm cov chaw cia khoom uas peb yuav siv thiab hloov kho cov kev ua haujlwm yog tias tsim nyog:

[buzz @ dns ~] $ su Lo Lus Cog Tseg: [hauv paus @ dns buzz] # cd /etc/yum.repos.d/
[cag @ dns yum.repos.d] # ls -l
tag nrho 28 -rw-r - r--. 1 paus hauv paus 1664 Dec 9 2015 CentOS-Base.repo -rw-r - r--. 1 paus hauv paus 1309 Dec 9 2015 CentOS-CR.repo -rw-r - r--. 1 paus hauv paus 649 Dec 9 2015 CentOS-Debuginfo.repo -rw-r - r--. 1 paus hauv paus 290 Dec 9 2015 CentOS-fasttrack.repo -rw-r - r--. 1 paus hauv paus 630 Dec 9 2015 CentOS-Media.repo -rw-r - r--. 1 paus hauv paus 1331 Dec 9 2015 CentOS-Sources.repo -rw-r - r--. 1 paus hauv paus 1952 Dec 9 2015 CentOS-Vault.repo

Nws yog qhov zoo los nyeem cov ntsiab lus ntawm cov ntawv tshaj tawm qub los ntawm CentOS pom zoo lub chaw cia khoom. Cov kev pauv hloov peb tau ua ntawm no yog vim peb tsis muaj siv Internet, thiab peb ua haujlwm nrog cov chaw khaws hauv zos tau rub tawm los ntawm WWW Village, los ntawm cov npoj yaig uas ua rau peb lub neej yooj yim dua. 😉

[cag @ dns yum.repos.d] # mkdir qub
[cag @ dns yum.repos.d] # mv CentOS- * thawj /

[cag @ dns yum.repos.d] # nano centos-repos.repo
[centos-base]
name=CentOS-$releasever
baseurl=http://10.10.10.1/repos/centos/7/base/
gpgcheck=0
enabled=1

[centos-updates]
name=CentOS-$releasever
baseurl=http://10.10.10.1/repos/centos/7/updates/x86_64/
gpgcheck=0
enabled=1

[cag @ dns yum.repos.d] # yum huv si txhua
Loaded plugins: ntim ceev tshaj plaws, langpacks Tu chaw khaws khoom: centos-base centos-updates Tu txhua yam

[hauv paus @ dns yum.repos.d] # yum hloov tshiab
Cov khoom ntsaws ruaj ruaj: fastmirror, centos-puag langpacks | 3.4 kB 00:00 centos-hloov tshiab | 3.4 kB 00:00 (1/2): centos-puag / primary_db | 5.3 MB 00:00 (2/2): centos-hloov tshiab / primary_db | 9.1 MB 00:00 Txiav txim tsom iav sai sai Tsis muaj pob khoom cim rau kev hloov tshiab

Cov lus «Tsis muaj (muaj) pob khoom cim rau hloov tshiab» - «Tsis muaj pob khoom cim rau kev hloov tshiab»Qhia tau tias, los ntawm tshaj tawm tshaj tawm txoj kev ceev tshaj plaws muaj rau peb thaum lub sijhawm teeb tsa, cov pob khoom tam sim no tau teeb tsa.

Hais txog SELinux cov ntsiab lus teb thiab cov foob pob hluav taws

Peb tab tom yuav tsom lub ntsiab lus no - yog lub hauv paus - ntawm kev siv cov kev pabcuam DNS thiab DHCP, uas yog Nws Lub Hom Phiaj Tseem Ceeb.

Yog tias ib qho kev nyeem ntawv tau xaiv Txoj Cai Kev Nyab Xeeb thaum lub sijhawm kev teeb tsa, raws li qhia hauv 06 duab ntawm qhov siv tsab xov xwm «CentOS 7 Hypervisor I - SMB Networks»Siv rau kev teeb tsa lub DNS no - DHCP server, thiab koj pom tias koj tsis paub yuav ua li cas txhim kho SELinux thiab CentOS Firewall, peb xav kom koj khiav cov hauv qab no:

Hloov kho cov ntawv / lwm yam / sysconfig / selinux thiab hloov SELINUX = tswj los ntawm SELINUX = lov tes taw

[cag @ dns ~] # nano / thiab / sysconfig / selinux
# Cov ntaub ntawv no tswj lub xeev ntawm SELinux ntawm lub system. # SELINUX = tuaj yeem ua ib qho ntawm peb qhov tseem ceeb: # tswj hwm - SELinux kev cai tswj hwm kev ruaj ntseg yog tswj hwm. # kev tso cai - SELinux luam tawm cov lus ceeb toom es tsis txhob yuam. # xiam oob qhab - Tsis muaj SELinux txoj cai thauj khoom.
SELINUX = neeg xiam oob khab
# SELINUXTYPE = tuaj yeem ua ib qho ntawm peb qhov nuj nqis: # tsom - Cov txheej txheem phiaj xwm raug tiv thaiv, # yam tsawg kawg - Kev hloov pauv ntawm txoj cai tswjfwm. Tsuas yog cov txheej txheem xaiv raug pr $ # mls - Muaj Kev Tiv Thaiv Ntau Qeb. SELINUXTYPE = tsom

Tom qab ntawd khiav cov lus qhia nram qab no

[hauv paus @ dns ~] # teeb meem 0
[hauv paus @ dns ~] # kev pab cuam firewalld nres
Xa rov rau / bin / systemctl nres cov nplauv hluav taws

[hauv paus @ dns ~] # systemctl lov tes taw firewalld
Tshem tawm symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. Tshem tawm symlink /etc/systemd/system/basic.target.wants/firewalld.service.

Yog tias koj siv lub DNS server ntsib hauv Is Taws Nem, koj yuav tsum TSIS TXHOB ua qhov saum toj no, tab sis tsim kho SELinux cov ntsiab lus thiab Firewall kom raug. Saib "Kev teeb tsa neeg rau zaub mov nrog GNU / Linux, los ntawm tus sau Joel Barrios Dueñas" lossis CentOS cov ntaub ntawv nws tus kheej - Lub kaus mom liab

Peb kho qhov KHWV - muaj npe

  • El Cov ntawv qhia /usr/share/doc/bind-9.9.4/ Nws muaj cov nqi zoo ntawm cov ntaub ntawv uas peb xav kom koj sab laj ua ntej muag khoom rau kev tshawb fawb hauv Internet yam tsis tau paub ua ntej, ntawm koj lub ntsis ntiv tes thiab hauv koj lub tsev, koj tuaj yeem nrhiav qhov koj tab tom nrhiav.

Hauv ntau qhov kev faib tawm cov kev pabcuam DNS tau nruab los ntawm BIND pob yog hu ua npe hu (Npe Daemon)). Hauv CentOS 7 nws tau nruab rau cov neeg xiam oob qhab los ntawm lub neej ntawd, raws li qhov tsim tawm ntawm cov lus txib nram qab no, qhov twg nws hais tias nws cov xwm txheejxiam oob khab«, Thiab hais tias lub xeev no tau tsim los ntawm nws cov neeg muag khoom - tus muag khoom presetCov. Rau cov ntaub ntawv, KHI yog Software dawb.

Ua kom cov kev pabcuam muaj npe

[hauv paus @ dns ~] # systemctl xwm txheej muaj npe
● names.service - Berkeley Lub Npe Hauv Is Taws Nem (DNS) Cov Lus Thauj: Load (/usr/lib/systemd/system/named.service; xiam oob khab; tus muag khoom preset: neeg xiam oob khab) Nquag: tsis ua haujlwm (tuag lawm)

[hauv paus @ dns ~] # systemctl ua kom muaj npe
Tsim symlink los ntawm /etc/systemd/system/multi-user.target.wants/named.service mus /usr/lib/systemd/system/named.service.

[cag @ dns ~] # systemctl pib muab npe

[hauv paus @ dns ~] # systemctl xwm txheej muaj npe
● names.service - Berkeley Lub Npe Hauv Is Taws Nem (DNS) Cov Lus Thauj: Load (/usr/lib/systemd/system/named.service; enabled; tus muag khoom preset: neeg xiam oob khab)
   Yam: nquag (khiav) txij hnub Sat 2017-01-28 13:22:38 EST; 5min dhau los Txheej Txheem: 1990 ExecStart = / usr / sbin / npe -u npe $ OPTIONS (code = rho tawm, xwm txheej = 0 / SUCCESS) Txheej Txheem: 1988 ExecStartPre = / bin / bash -c yog [! "$ DISABLE_ZONE_CHECKING" == "yog"]; ces / usr / sbin / npe-checkconf -z /etc/named.conf; lwm tus ncha "Txheeb xyuas cov ntaub ntawv hauv cheeb tsam yog xiam oob khab"; fi (code = tshem tawm, xwm txheej = 0 / SUCCESS) Main PID: 1993 (npe) CGroup: /system.slice/ame.service └─1993 / usr / sbin / npe -u npe Jan 28 13:22:45 dns npe [1993]: kev ua yuam kev (network tsis pom zoo) kev daws './NS/IN': 2001: 500: 2f :: f # 53 Jan 28 13:22:47 dns muaj npe [1993]: kev ua yuam kev (network tsis cuag) daws './ DNSKEY / IN ': 2001: 500: 3 :: 42 # 53 Jan 28 13:22:47 dns muaj npe [1993]: kev ua tsis ncaj ncees (network tsis cuag) daws' ./NS/IN ': 2001: 500: 3: 42 # 53 Jan 28 13:22:47 dns muaj npe [1993]: kev ua yuam kev (network tsis xa mus cuag) daws './DNSKEY/IN': 2001: 500: 2d :: d # 53 Jan 28 13:22:47 dns lub npe [1993 ]: kev ua yuam kev (network tsis pom zoo) kev daws './NS/IN': 2001: 500: 2d:: d # 53 Jan 28 13:22:47 dns muaj npe [1993]: kev ua yuam kev (network tsis sib cuag) daws teeb meem './DNSKEY/ IN ': 2001: dc3 :: 35 # 53 Jan 28 13:22:47 dns lub npe [1993]: kev ua yuam kev (network tsis sib cuag) daws' ./NS/IN ': 2001: dc3 :: 35 # 53 Jan 28 13: 22:47 dns npe [1993]: kev ua yuam kev (network tsis cuag) kev daws './DNSKEY/IN': 2001: 7fe :: 53 # 53 Jan 28 13:22:47 dns npe [1993]: yuam kev (network tsis cuag) olving './NS/IN': 2001: 7fe :: 53 # 53 Jan 28 13:22:48 dns muaj npe [1993]: tswj-tuav-cheeb tsam: tsis tau nqa DNSKEY teeb '.': timed tawm

[hauv paus @ dns ~] # systemctl rov qab npe

[hauv paus @ dns ~] # systemctl xwm txheej muaj npe
● names.service - Berkeley Lub Npe Hauv Is Taws Nem (DNS) Cov Thauj Khoom: thauj khoom (/usr/lib/systemd/system/ame.service; qhib siv; tus neeg muag khoom preset: neeg xiam oob khab)
   Yam: nquag (khiav) txij hnub Sat 2017-01-28 13:29:41 EST; 1s dhau los Txheej Txheem: 1449 ExecStop = / bin / sh -c / usr / sbin / rndc nres> / dev / thov 2> & 1 || / bin / tua -TERM $ MAINPID (code = tshem tawm, xwm txheej = 0 / SUCCESS) Txheej Txheem: 1460 ExecStart = / usr / sbin / npe -u muaj npe $ XAIV (code = tshem tawm, xwm txheej = 0 / SUCCESS) Txheej Txheem: 1457 ExecStartPre = / rau hauv / bash -c yog [! "$ DISABLE_ZONE_CHECKING" == "yog"]; tom qab ntawd / usr / sbin / npe-checkconf -z /etc/named.conf; lwm tus ncha "Txheeb xyuas cov ntaub ntawv hauv cheeb tsam yog xiam oob khab"; fi (code = tshem tawm, xwm txheej = 0 / SUCCESS) Main PID: 1463 (npe) CGroup: /system.slice/ame.service └─1463 / usr / sbin / npe -u npe Jan 28 13:29:41 dns npe [1463]: tswj-yuam-cheeb tsam: ntawv cov ntawv sau tseg tsis muaj hnub nyoog: tshem cov ntawv xov xwm ceev tseg Jan 28 13:29:41 dns lub npe [1463]: tswj-tuav-cheeb tsam: thauj cov lus Jan 2 28 13:29:41 dns teev npe [1463]: cheeb tsam 0.in-addr.arpa/IN: muaj cov xuv xaim 0 Jan 28 13:29:41 dns teev npe [1463]: cheeb tsam localhost.localdomain / IN: loaded txog 0 Jan 28 13:29:41 dns muaj npe [1463]: thaj chaw 1.0.0.127.in-addr.arpa/IN: thauj khoom ntu 0 Jan 28 13:29:41 dns muaj npe [1463]: cheeb tsam 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 .6.ip0.arpa / IN: loaded txog 28 Jan 13 29:41:1463 dns muaj npe [0]: cheeb tsam localhost / IN: loaded txog 28 Jan 13 29 : 41: 1463 dns npe [28]: txhua thaj chaw thauj khoom Jan 13 29:41:1463 dns muaj npe [28]: khiav Jan 13 29:41:1 dns systemd [XNUMX]: Pib Berkeley Internet Lub Npe Sau (DNS).

Tom qab peb qhib qhov kev pabcuam npe hu thiab peb pib nws rau thawj zaug sijhawm, qhov tawm los ntawm kev hais kom ua systemctl xwm txheej muaj npe qhia tau yuam kev. Thaum peb rov pib qhov kev pabcuam hauv qab no, tus npe hu tsim tag nrho cov ntaub ntawv teeb tsa uas, los ntawm lub neej ntawd, tsim nyog rau nws txoj haujlwm ua haujlwm. Yog li no, thaum peb rov ua kom tiav cov lus txib dua systemctl xwm txheej muaj npe tsis muaj ntxiv yuam kev yog qhia.

  • Nyob zoo, kim, thiab xav tau kev nyeem ntawv: yog tias koj xav nrhiav kom paub-tsawg kawg- txoj kev twg ua rau koj qhov kawg ntawm tus luav lub qhov, thov twj ywm nyeem cov ncauj lus kom ntxaws ntawm txhua lo lus txib 😉 Tshaj tawm tsab xov xwm yuav zoo li ntev me ntsis, tab sis tsis txhob tsis kam lees tias nws nce hauv kev piav qhia thiab pom meej.

Peb hloov kho cov ntaub ntawv /etc/named.conf

Ntau tus neeg nyeem cov lus hais tawm -Kuv tsis hais nws- Cov mania uas cov tswj hwm Linux sib faib tau muaj, ntawm cov ntaub ntawv teeb tsa qhov system teeb tsa hauv cov nplaub tshev nrog cov npe sib txawv nyob ntawm qhov distro. Nkawd ua yog lawm. Tab sis dab tsi tuaj yeem peb, cov neeg siv yooj yim uas siv cov khoom faib no, ua tau? Kho kom raug! 😉

Los ntawm txoj kev, hauv FreeBSD, UNIX® clone «Lub hauv paus chiv keeb», cov ntaub ntawv nyob hauv /usr/local/etc/namedb/named.conf; thaum nyob hauv Debian, ntxiv rau kev faib ua plaub cov ntaub ntawv npe.conf, npe.conf.options, npe.conf.default-aav, thiab npe.conf.local, yog hauv daim nplaub tshev / thiab lwm yam / khi /Cov. Cov neeg uas xav paub txog qhov twg openSUSE muab nws, nyeem «DNS thiab DHCP hauv openSUSE 13.2 Harlequin - Networks«. Txawj nyeem ntawv yog txoj cai! 😉

Thiab raws li peb ib txwm ua: ua ntej hloov kho dab tsi, peb khaws cov qauv teeb tsa ua thawj hauv lwm lub npe.

[cag @ dns ~] # cp /etc/named.conf /etc/named.conf.original

Txhawm rau ua kom lub neej yoojyim dua, es tsis txhob ua tus yuam sij TSI rau dynamic DNS hloov tshiab los ntawm DHCP, peb theej tib tus yuam sij rndc.key raws li dhcp.key.

[cag @ dns ~] # cp /etc/rndc.key /etc/dhcp.key

[cag @ dns ~] # nano /etc/dhcp.key
yawm sij "dhcp-key" {algorithm hmac-md5; zais cia "OI7Vs + TO83L7ghUm2xNVKg =="; };

Yog li ntawd cov npe hu tuaj yeem nyeem cov ntaub ntawv tsuas yog theej, peb hloov nws tus tswv pab pawg:

[cag @ dns ~] # chown hauv paus: npe /etc/dhcp.key [cag @ dns ~] # ls -l /etc/rndc.key /etc/dhcp.key -rw-r -----. 1 tus hauv paus npe muaj 77 Jan 28 16:36 PM /etc/dhcp.key -rw-r -----. 1 tus hauv paus hniav muaj npe 77 Jan 28 13:22 /etc/rndc.key

Cov ntsiab lus me me zoo li yav dhau los yog dab tsi uas tuaj yeem tsav peb vwm rau xam, tam sim no ... qhov teeb meem nyob qhov twg ...? nrog rau qee qhov kev tshaj lij ntxiv, uas peb tsis sau ntawv tawm ntawm kev hwm rau Kev hwm.

Tam sim no yog tias - thaum kawg! - peb hloov kho cov ntawv /etc/named.confCov. Cov kev pauv pauv lossis ntxiv ntxiv uas peb tau ua, nrog rau qhov qub, nyob hauv siab tawv. Ua tibzoo saib qhov tsawg.

[cag @ dns ~] # nano /etc/named.conf
// // names.conf // // Muab los ntawm Red Hat khi lub pob kom configure ISC BIND npe (8) DNS // server raws li qhov caching tsuas yog nameserver (raws li localhost DNS daws xwb). // // Saib / usr / qhia tawm / doc / khi * / qauv / piv txwv npe cov ntaub ntawv cov ntaub ntawv. //

// Daim Ntawv Teev Cov Cuab Yeej Tswj Xyuas kev tshaj tawm tias cov kev sib tham twg yuav tuaj yeem sab laj
// kuv muaj npe neeg rau zaub mov
acl siv {
 127.0.0.0 / 8;
 192.168.10.0 / 24;
};

xaiv {
 // Kuv tshaj tawm tias daemon uas muaj npe kuj mloog rau lub interface
 // eth0 uas muaj tus IP: 192.168.10.5
    mloog-ntawm chaw nres nkoj 53 {127.0.0.1; 192.168.10.5; };
    mloog-rau-v6 chaw nres nkoj 53 {:: 1; }; phau ntawv qhia "/ var / npe"; tsuav-cov ntaub ntawv "/var/named/data/cache_dump.db"; cov txheeb cais-cov ntaub ntawv "/var/named/data/named_stats.txt"; memstatistics-cov ntaub ntawv "/var/named/data/named_mem_stats.txt";

 // Forwarders daim ntawv qhia
 // forwarders {
 // 0.0.0.0;
 // 1.1.1.1;
 //};
    // rau tom ntej;

    // Kuv tsuas tso cai nug lus rau kuv tus ACL mired
    cia-lus nug {mired; }; // Txhawm rau kuaj nrog cov lus txib khawb los ntawm linux.fan axfr // los ntawm SysAdmin workstation thiab localhost tsuas yog // Peb tsis muaj qhev DNS servers. Peb tsis xav tau nws ... txog rau tam sim no.
 tso cai-hloov pauv {localhost; 192.168.10.1; };

    / * - Yog tias koj tab tom tsim ib tug neeg rau zaub mov DNS DNS, TSIS TXHOB rov qab thov dua. - Yog tias koj tab tom tsim lub tsev RECURSIVE (caching) DNS server, koj yuav tsum muaj peev xwm rov qab ua dua tshiab. - Yog tias koj lub npe hu ua DNS recursive muaj IP chaw nyob ntawm pej xeem, koj YUAV TSUM pab kom nkag mus tswj kev txwv txiav cov lus nug rau koj cov neeg siv raug cai. Ua tsis tiav qhov ntawd yuav ua rau koj cov neeg rau zaub mov dhau los ua ib feem ntawm qhov kev ua tiav loj ntawm DNS ua kom nrov nrov. Kev siv BCP38 hauv koj lub network yuav txo tau ntau qhov nres nres * /
    // Peb xav tau tus neeg rau zaub mov AUTHORITY rau peb LAN - SME
    rov qab thov dua tsis muaj;

    dnssec-pab tau yog; dnssec-siv tau yog; / * Txoj hauv kev rau ISC DLV yuam sij * / bindkeys-file "/etc/named.iscdlv.key"; managed-keys-directory "/ var / npe / hloov zog"; pid-file "/run/named/named.pid"; kev sib kho-keyfile "/run/named/session.key"; }; txiav ntoo {channel default_debug {cov ntaub ntawv "cov ntaub ntawv / npe.run"; loj heev raug; }; }; cheeb tsam "." IN {ntaus cov ntawv; cov ntaub ntawv "named.ca"; }; suav nrog "/etc/named.rfc1912.zones"; suav nrog "/etc/named.root.key";

// Peb suav nrog TSIG qhov tseem ceeb rau dynamic DNS hloov tshiab // los ntawm DHCP
suav nrog "/etc/dhcp.key";

// Tshaj tawm ntawm lub npe, hom, qhov chaw, thiab kev tso cai hloov kho tshiab
// ntawm Cov Ntaub Ntawv DNS Cov Zauv // Ob Thaj Tsam yog MASTERS
tsam "desdelinux.fan" {
 hom tswv;
 cov ntaub ntawv "dynamic / db.fromlinux.fan";
 cia-hloov kho {qhov tseem ceeb dhcp-key; };
};

cheeb tsam "10.168.192.in-addr.arpa" {
 hom tswv;
 cov ntaub ntawv "dynamic / db.10.168.192.in-addr.arpa";
 cia-hloov kho {qhov tseem ceeb dhcp-key; };
};

Peb kuaj cov syntax

[hauv paus @ dns ~] # npe-checkconf 
[hauv paus @ dns ~] #

Txij li cov lus hais saum toj no tsis rov qab dab tsi, syntax yog OK. Txawm li cas los xij, yog tias peb ua tiav tib cov lus txib, tab sis nrog txoj hauv kev -z, cov zis yuav yog:

[cag @ dns ~] # npe-checkconf -z
cheeb tsam localhost.localdomain / IN: loaded serial 0 cheeb tsam localhost / IN: loaded serial 0 cheeb tsam 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 .ip6.arpa / IN: loaded txog 0 cheeb tsam 1.0.0.127.in-addr.arpa/IN: thauj khoom ntu 0 xoom 0.in-addr.arpa/IN: thauj khoom dhau 0 ntu los ntawm linux.fan/IN: thauj khoom ntawm tswv file dynamic / db.from linux.fan ua tsis tiav: cov ntaub ntawv tsis pom thaj tsam los ntawm linux.fan/IN: tsis thauj khoom vim muaj teeb meem. _default / desdelinux.fan / IN: cov ntaub ntawv tsis pom tsam 10.168.192.in-addr.arpa/IN: chaw thau khoom los ntawm cov ntaub ntawv dynamic / db.10.168.192.in-addr.arpa tsis ua tiav: cov ntaub ntawv tsis pom tsam 10.168.192 .in-addr.arpa / IN: tsis thauj khoom vim muaj teeb meem. _default / 10.168.192.in-addr.arpa / IN: cov ntaub ntawv tsis pom

Tau kawg lawv yog qhov yuam kev uas tau tshwm sim vim tias peb tseem tsis tau tsim cov ntawv sau npe hauv DNS rau peb sau.

  • Yog xav paub ntxiv txog kev hais kom ua npe-checkconf, khiav tus txiv neej npe-checkconf, ua ntej nrhiav lwm yam ntaub ntawv hauv Is Taws Nem. Kuv paub tseeb tias koj yuav txuag lub sijhawm zoo.

Peb tsim cov ntawv ncaj qha los ntawm linux.fan

... tsis yog tsis muaj me ntsis kev tshawb xav ua ntej. 😉

Raws li tus tsim los tsim cov ntaub ntawv cheeb tsam cov ntaub ntawv, peb tuaj yeem coj tus /var/named/named.empty, lossis cov /usr/share/doc/bind-9.9.4/sample/var/named/named.emptyCov. Ob qho tib si zoo sib xws.

[cag @ dns ~] # miv /var/named/named.empty 
$ TTL 3H @ IN SOA @ rname.invalid. (0; ntu 1D; rov ua dua 1H; rov ua dua 1W; tas sij hawm 3H); yam tsawg kawg nkaus los yog Kev tsis zoo caching lub sij hawm los nyob NS @ A 127.0.0.1 AAAA :: 1

Lub sij hawm ntawm lub neej - Sijhawm los nyob TTL SOA ntaub ntawv

Caw ib pab niam txiv los piav txog TTL - Lub sijhawm los nyob los ntawm cov ntawv sau npe SOA - Pib Cai ntawm tus Tswv Tsam. Nws yog qhov nthuav kom paub lawv lub ntsiab rau thaum peb xav kom hloov kho txhua yam ntawm lawv lub txiaj ntsig.

$ TTL: Lub sij hawm ntawm lub neej - Sijhawm los nyob rau tag nrho cov ntaub ntawv khaws cia hauv cov ntaub ntawv uas ua raws cov lus tshaj tawm (tab sis ua ntej lwm qhov $ TTL tshaj tawm) thiab tsis muaj qhov tshaj tawm TTL tshaj tawm.

Teeb meem: Txog ntawm cov ntaub ntawv Thaj Tsam. Txhua txhua lub sijhawm peb hloov kho cov ntaub ntawv sau npe hauv DNS hauv ib cheeb tsam, peb yuav tsum nce tus lej ntawd 1, tshwj xeeb yog peb muaj cov qhev lossis cov server thib ob. Txhua txhua lub sij hawm theem nrab lossis qhev DNS neeg rau zaub mov hu rau nws tus tswv server, nws nug txog tus lej ntawm tus tswv cov ntaub ntawv. Yog hais tias tus qhev tus lej xov tooj tsawg dua, ces cov ntaub ntawv rau cheeb tsam ntawd ntawm tus qhev server tsis muaj hnub nyoog, thiab tus qhev xa tawm thaj tsam hloov chaw ntawm nws tus kheej.

refresh: Qhia txog tus qhev lub ntus lub sijhawm nyob rau hauv uas qhov kev tshuaj xyuas yog tias nws cov ntaub ntawv hloov tshiab nrog rau kev hwm tus tswv.

rov ua dua: Yog tias tus tswv server tsis muaj - vim nws tau mob, hais qhia - rau tus qhev tom qab lub sijhawm sib nrug refresh, rov ua dua Nws qhia tus qhev ntev npaum li cas tos ua ntej sim hu nws tus tswv ntxiv.

tas sij hawm: Yog tias tus qhev tsis tuaj yeem hu rau nws tus tswv rau lub sijhawm tas sij hawmTom qab ntawd yog tias tus qhev-tus tswv ntawm thaj chaw kev sib raug zoo tau raug ntsia hlau me me, thiab tus qhev server tsis muaj kev xaiv tab sis tas lub sijhawm ntawm thaj tsam hauv nqe lus nug. Qhov tas sij hawm ntawm ib cheeb tsam los ntawm ib tus qhev DNS server txhais tau tias nws yuav nres teb rau cov lus nug DNS uas cuam tshuam nrog cheeb tsam ntawd, vim hais tias cov ntaub ntawv muaj nyob dhau qub tsis muaj txiaj ntsig.

  • Qhov saum toj no qhia peb ncaj qha thiab ua haujlwm nrog kev nkag siab zoo-qhov tsawg tshaj plaws ntawm kev nkag siab- tias yog tias peb tsis xav tau qhev DNS cov haujlwm rau kev ua haujlwm ntawm peb cov SME, peb tsis siv nws, tshwj tsis yog lawv nruj tsim nyog. Peb ib txwm sim mus ntawm qhov yooj yim mus rau cov nyom.

tsawg tshaj plaws: Hauv cov qauv ua ntej Khim 8.2, cov ntaub ntawv kawg SOA Nws tseem qhia tau tias lub neej dhau los - Lub sijhawm puag thaum nyob, thiab Cache Tsis Zoo Lub Neej - Lub sijhawm tsis zoo caching nyob rau Thaj Chaw. Lub sijhawm no hais txog txhua yam lus tsis zoo muab los ntawm cov neeg saib xyuas pom zoo ntawm Thaj Tsam.

Tsam cov ntaub ntawv /var/named/dynamic/db.fromlinux.fan

[cag @ dns ~] # nano /var/named/dynamic/db.fromlinux.fan
$ TTL 3H @ IN SOA dns.fromlinux.fan. root.dns.fromlinux.fan. (1; ntu 1D; rov ua dua 1H; rov ua dua 1W; tas sij hawm 3H); yam tsawg kawg los yog; Lub sijhawm tsis zoo caching nyob; @ HAUV NS dns.fromlinux.fan. @ IN MX 10 xa.fromlinux.fan. @ IN TXT "FromLinux, koj qhov blog tau mob siab rau Free Software"; sysadmin IN A 192.168.10.1 ad-dc IN A 192.168.10.3 fileserver IN A 192.168.10.4 dns IN A 192.168.10.5 proxyweb IN A 192.168.10.6 blog IN A 192.168.10.7 ftpserver IN A 192.168.10.8 xa ntawv hauv A 192.168.10.9

Peb tshawb xyuas /var/named/dynamic/db.fromlinux.fan

[cag @ dns ~] # npe-checkzone los ntawm linux.fan / var / npe / dynamic / db. los ntawm linux.fan
tsam los ntawm linux.fan/IN: thauj txog ntu 1 OK

Peb tsim kom Rov Tshawb Fawb Cov Ntaub Ntawv 10.168.192.in-addr.arpa

  • Cov SOA ceev ntawm cov Thaj Tsam no yog qhov zoo tib yam li ntawm Thaj Chaw Ncaj Qha tsis tau xav txog MX cov ntaub ntawv..
[cag @ dns ~] # nano /var/named/dynamic/db.10.168.192.in-addr.arpa
$ TTL 3H @ IN SOA dns.fromlinux.fan. root.dns.fromlinux.fan. (1; ntu 1D; rov ua dua 1H; rov ua dua 1W; tas sij hawm 3H); yam tsawg kawg los yog; Lub sijhawm tsis zoo caching nyob; @ HAUV NS dns.fromlinux.fan. ; 1 HAUV PTR sysadmin.fromlinux.fan. 3 HAUV PTR ad-dc.fromlinux.fan. 4 HAUV PTR fileserver.fromlinux.fan. 5 HAUV PTR dns.fromlinux.fan. 6 HAUV PTR proxyweb.desdelinux.fan. 7 HAUV PTR blog.desdelinux.fan. 8 HAUV PTR ftpserver.fromlinux.fan. 9 HAUV PTR xa.fromlinux.fan.

[cag @ dns ~] # npe-checkzone 10.168.192.in-addr.arpa /var/named/dynamic/db.10.168.192.in-addr.arpa 
tsam 10.168.192.in-addr.arpa/IN: thauj cov ntu 1 OK

Ua ntej rov qab qhib lub npe peb tshawb xyuas nws cov kev teeb tsa

  • Txog thaum peb paub tseeb tias cov ntaub ntawv teeb tsa ntawm cov npe hu ua.conf, thiab nws cov ntaub ntawv cheeb tsam tsis tau teeb tsa kom raug, peb xav kom tsis txhob pib dua lub npe daemon. Yog tias peb ua qhov no thiab tom qab ntawd hloov kho cov ntaub ntawv cheeb tsam, peb yuav tsum nce cov xov tooj ntawm cov hloov cheeb tsam los ntawm 1.
  • Peb saib qhov "." Qhov kawg ntawm lub npe thiab tus tswv tsev npe.
[hauv paus @ dns ~] # npe-checkconf 
[cag @ dns ~] # npe-checkconf -z
cheeb tsam localhost.localdomain / IN: loaded serial 0 cheeb tsam localhost / IN: loaded serial 0 cheeb tsam 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 .ip6.arpa / IN: loaded txog 0 cheeb tsam 1.0.0.127.in-addr.arpa/IN: loaded txog ntu 0 cheeb tsam 0.in-addr.arpa/IN: loaded txog ntu 0 ntawm linux.fan/IN: loaded txog ntu 1 tsam 10.168.192.in-addr.arpa/IN: thauj cov ntu 1

Txhua lub npe hu ua tam sim no

Txhawm rau kom pom tseeb, thiab txawm hais tias tsab xov xwm dhau mus ntev, peb muab cov khoom tiav tiav ntawm cov lus txib npe-checkconf -zp:

[cag @ dns ~] # npe-checkconf -zp
cheeb tsam localhost.localdomain / IN: loaded serial 0 cheeb tsam localhost / IN: loaded serial 0 tsam 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 .ip6.arpa / IN: loaded txog 0 cheeb tsam 1.0.0.127.in-addr.arpa/IN: loaded txog ntu 0 cheeb tsam 0.in-addr.arpa/IN: loaded txog ntu 0 ntawm linux.fan/IN: loaded txog ntu 1 thaj tsam 10.168.192.in-addr.arpa/IN: thauj khoom raws 1 qho kev xaiv {bindkeys-file "/etc/named.iscdlv.key"; kev sib kho-keyfile "/run/named/session.key"; phau ntawv qhia "/ var / npe"; tsuav-cov ntaub ntawv "/var/named/data/cache_dump.db"; mloog-ntawm chaw nres nkoj 53 {127.0.0.1/32; 192.168.10.5/32; }; mloog-rau-v6 chaw nres nkoj 53 {:: 1/128; }; managed-keys-directory "/ var / npe / hloov zog"; memstatistics-cov ntaub ntawv "/var/named/data/named_mem_stats.txt"; pid-file "/run/named/named.pid"; cov txheeb cais-cov ntaub ntawv "/var/named/data/named_stats.txt"; dnssec-pab tau yog; dnssec-siv tau yog; rov qab thov dua tsis muaj; kheev-nug {"mired"; }; tso cai-hloov pauv {192.168.10.1/32; }; }; acl "mired" {127.0.0.0/8; 192.168.10.0/24; }; txiav ntoo {channel "default_debug" {cov ntaub ntawv "cov ntaub ntawv / npe.run"; loj heev raug; }; }; yawm sij "dhcp-key" {algorithm "hmac-md5"; zais cia "OI7Vs + TO83L7ghUm2xNVKg =="; }; cheeb tsam "." HAUV {ntaus cov haujlwm; cov ntaub ntawv "named.ca"; }; cheeb tsam "localhost.localdomain" IN {hom tswv; cov ntaub ntawv "npe.localhost"; pub-hloov pauv {"tsis muaj"; }; }; cheeb tsam "localhost" HAUV {hom tswv; cov ntaub ntawv "npe.localhost"; pub-hloov pauv {"tsis muaj"; }; }; cheeb tsam "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {hom tswv; cov ntaub ntawv "named.loopback"; pub-hloov pauv {"tsis muaj"; }; }; cheeb tsam "1.0.0.127.in-addr.arpa" IN {ntaus tswv; cov ntaub ntawv "named.loopback"; pub-hloov pauv {"tsis muaj"; }; }; thaj tsam "0.in-addr.arpa" IN {ntaus tswv; cov ntaub ntawv "named.empty"; pub-hloov pauv {"tsis muaj"; }; }; tsam "desdelinux.fan" {hom tswv; cov ntaub ntawv "dynamic / db.fromlinux.fan"; tso cai-hloov kho {key "dhcp-key"; }; }; cheeb tsam "10.168.192.in-addr.arpa" {hom tswv; cov ntaub ntawv "dynamic / db.10.168.192.in-addr.arpa"; tso cai-hloov kho {key "dhcp-key"; }; }; tswj-yuam sij {"." tseem ceeb thawj zaug-257 nyob rau hauv lub peb hlis ntuj 3 "AwEAAagAIKlVZrpC8Ia6gEzahOR + 7W9euxhJhVVLOyQbSEW29O0gcCjF FVQUTf8v6fLjwBd58YI0EzrAcQqBGCzh / RStIoO0g8NfnfL0MTJRkxoX bfDaUeVPQuYEhg2NZWAJQ37VnMVDxP / VHL9M / QZxkjf496 / Efucp5gaD X2RS6CXpoY6LsvPVjR68ZSwzz0apAzvN1dlzEheX9ICJBBtuA7G6LQpz W3hOA5hzCTMjJPJ2LbqF8dsV6DoBQzgul6sGIcGOYl0OyQdXfZ7relS Qageu + ipAdTTJ57AsRTAoub25ONGcLmqrAmRLKBP8dfwhYB1N4knNnulq QXA + Uk7ihz1 ="; };
  • Ua raws cov txheej txheem ntawm kev hloov kho npe.conf Raws li peb cov kev xav tau thiab tshawb xyuas, thiab tsim txhua thaj chaw cov ntaub ntawv thiab tshawb xyuas nws, peb tsis ntseeg tias peb yuav tau ntsib teeb meem loj teeb tsa. Thaum kawg peb paub tias nws yog tus tub txoj kev ua si, nrog ntau lub tswv yim thiab fussy syntax. 😉

Cov tshev xa rov qab tau zoo txaus siab, yog li peb tuaj yeem rov pib KHWV - npe hu.

Peb rov qab lub npe thiab kuaj nws qhov xwm txheej

[hauv paus @ dns ~] # systemctl rov qab npe hu ua.service
[hauv paus @ dns ~] # systemctl xwm txheej hu ua.service

Yog tias peb tau txais txhua yam kev ua yuam kev hauv qhov tsim tawm ntawm cov lus kawg, peb yuav tsum rov pib dua qhov npe.service thiab ntsuas koj raws li txoj caiCov. Yog tias cov kev txhaum ploj, kev pabcuam pib ua tiav. Txwv tsis pub, peb yuav tsum ua qhov kev tshuaj xyuas txhua qhov tau hloov thiab tsim cov ntaub ntawv, thiab rov ua qhov txheej txheem.

Cov lag luam tsim tawm ntawm cov xwm txheej yuav tsum yog:

[hauv paus @ dns ~] # systemctl xwm txheej hu ua.service
● names.service - Berkeley Lub Npe Hauv Is Taws Nem (DNS) Cov Haujlwm: Load (/usr/lib/systemd/system/ame.service; qhib siv; tus neeg muag khoom preset: xiam oob khab) Active: nquag (khiav) txij Hnub Tswb 2017-01-29 10:05:32 EST; 2min 57s dhau los Txheej Txheem: 1777 ExecStop = / bin / sh -c / usr / sbin / rndc nres> / dev / thov 2> & 1 || / bin / tua -TERM $ MAINPID (code = tshem tawm, xwm txheej = 0 / SUCCESS) Txheej Txheem: 1788 ExecStart = / usr / sbin / npe -u muaj npe $ XAIV (code = tshem tawm, xwm txheej = 0 / SUCCESS) Txheej Txheem: 1786 ExecStartPre = / rau hauv / bash -c yog [! "$ DISABLE_ZONE_CHECKING" == "yog"]; ces / usr / sbin / npe-checkconf -z /etc/named.conf; lwm tus ncha "Txheeb xyuas cov ntaub ntawv hauv cheeb tsam yog xiam oob khab"; fi (code = tshem tawm, xwm txheej = 0 / SUCCESS) Main PID: 1791 (npe) CGroup: /system.slice/ame.service └─1791 / usr / sbin / npe -u npe Jan 29 10:05:32 dns npe [1791]: cheeb tsam 1.0.0.127.in-addr.arpa/IN: thauj khoom txog 0 Jan 29 10:05:32 dns muaj npe [1791]: cheeb tsam 10.168.192.in-addr.arpa/IN: thauj khoom txog 1 Jan 29 10:05:32 dns muaj npe [1791]: thaj chaw 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN : loaded txog ntawm 0 Jan 29 10:05:32 dns lub npe [1791]: cheeb tsam desdelinux.fan/IN: loaded txog ntu 1 Jan 29 10:05:32 dns muaj npe [1791]: cheeb tsam localhost.localdomain / IN: loaded serial 0 Lub Ib Hlis 29 10:05:32 dns muaj npe [1791]: thaj chaw localhost / IN: thauj khoom dhau los 0 Jan 29 10:05:32 dns muaj npe [1791]: tag nrho cov aav thauj khoom
Jan 29 10:05:32 dns muaj npe [1791]: khiav
Jan 29 10:05:32 dns systemd [1]: Pib Berkeley Kev Siv Npe Hauv Is Taws Nem (DNS). Jan 29 10:05:32 dns muaj npe [1791]: thaj tsam 10.168.192.in-addr.arpa/IN: xa xov qhia (ntu 1)

Cov tshev

Cov tshev tuaj yeem khiav ntawm tib lub server lossis ntawm lub tshuab txuas nrog LAN. Peb nyiam ua los ntawm pawg sysadmin.fromlinux.fan uas peb tau tso cai nthuav dav los ua Thaj Chaw Hloov Chaw. Cov ntaub ntawv /etc/resolv.conf ntawm pab pawg ntawd yog cov hauv qab no:

buzz @ sysadmin: ~ $ miv /etc/resolv.conf 
# Tsim los ntawm NetworkManager nrhiav los ntawm linux.fan nameserver 192.168.10.5

buzz @ sysadmin: ~ $ khawb ntawm linux.fan axfr
; << >> DiG 9.9.5-9 + deb8u1-Debian << >> los ntawm linux.fan axfr ;; kev xaiv thoob ntiaj teb: + cmd los ntawm linux.fan. 10800 HAUV SOA dns.fromlinux.fan. root.dns.fromlinux.fan. 1 86400 3600 604800 10800 los ntawm linux.fan. 10800 HAUV NS dns.fromlinux.fan. los ntawm linux.fan. 10800 IN MX 10 xa.fromlinux.fan. los ntawm linux.fan. 10800 IN TXT "FromLinux, koj qhov blog mob siab rau Software dawb" ad-dc.desdelinux.fan. 10800 IN A 192.168.10.3 blog.desdelinux.fan. 10800 IN A 192.168.10.7 dns.fromlinux.fan. 10800 IN A 192.168.10.5 fileserver.fromlinux.fan. 10800 IN A 192.168.10.4 ftpserver.fromlinux.fan. 10800 IN A 192.168.10.8 xa.fromlinux.fan. 10800 IN A 192.168.10.9 proxyweb.fromlinux.fan. 10800 IN A 192.168.10.6 sysadmin.fromlinux.fan. 10800 IN Rau 192.168.10.1 los ntawm linux.fan. 10800 HAUV SOA dns.fromlinux.fan. root.dns.fromlinux.fan. 1 86400 3600 604800 10800 ;; Lub sijhawm nug: 0 msec ;; COV PAB: 192.168.10.5 # 53 (192.168.10.5) ;; THAUM TWG: Hnub Jan 29 11:44:18 EST 2017 ;; XFR loj: 13 cov ntaub ntawv (xov 1, bytes 385)

buzz @ sysadmin: ~ $ dig 10.168.192.in-addr.arpa axfr
; << >> DiG 9.9.5-9 + deb8u1-Debian << >> 10.168.192.in-addr.arpa axfr ;; kev xaiv thoob ntiaj teb: + cmd 10.168.192.in-addr.arpa. 10800 HAUV SOA dns.fromlinux.fan.10.168.192.in-addr.arpa. root.dns.fromlinux.fan.10.168.192.in-addr.arpa. 1 86400 3600 604800 10800 10.168.192.in-addr.arpa. 10800 HAUV NS dns.fromlinux.fan. 1.10.168.192.in-addr.arpa. 10800 HAUV PTR sysadmin.fromlinux.fan. 3.10.168.192.in-addr.arpa. 10800 HAUV PTR ad-dc.fromlinux.fan. 4.10.168.192.in-addr.arpa. 10800 HAUV PTR fileserver.fromlinux.fan. 5.10.168.192.in-addr.arpa. 10800 HAUV PTR dns.fromlinux.fan. 6.10.168.192.in-addr.arpa. 10800 HAUV PTR proxyweb.fromlinux.fan. 7.10.168.192.in-addr.arpa. 10800 HAUV PTR blog.desdelinux.fan. 8.10.168.192.in-addr.arpa. 10800 HAUV PTR ftpserver.fromlinux.fan. 9.10.168.192.in-addr.arpa. 10800 HAUV PTR xa.fromlinux.fan. 10.168.192.in-addr.arpa. 10800 HAUV SOA dns.fromlinux.fan.10.168.192.in-addr.arpa. root.dns.fromlinux.fan.10.168.192.in-addr.arpa. 1 86400 3600 604800 10800 ;; Lub sijhawm nug: 0 msec ;; COV PAB: 192.168.10.5 # 53 (192.168.10.5) ;; THAUM TWG: Tshav Jan 29 11:44:57 EST 2017 ;; XFR loj: 11 cov ntaub ntawv (xov 1, bytes 352)

buzz @ sysadmin: ~ $ dig HAUV SOA los ntawm linux.fan
buzz @ sysadmin: ~ $ dig HAUV MX los ntawm linux.fan buzz @ sysadmin: ~ $ dig HAUV TXT los ntawm linux.fan
buzz @ sysadmin: ~ $ host dns
dns.fromlinux.fan muaj chaw nyob 192.168.10.5
buzz @ sysadmin: ~ $ host sysadmin
sysadmin.desdelinux.fan muaj chaw nyob 192.168.10.1 ... Thiab lwm yam tshev peb xav tau
  • Txog tam sim no, peb muaj lub hauv paus rau DNS server hauv peb qhov SME network. Peb cia siab tias koj tau nyiam tag nrho cov txheej txheem, uas yooj yim heev, txoj cai? 😉

Peb nruab thiab teeb tsa DHCP

[hauv paus @ dns ~] # yum nruab dhcp
Cov khoom ntsaws ruaj ruaj: fastmirror, centos-puag langpacks | 3.4 kB 00:00:00 centos-hloov tshiab | 3.4 kB 00:00:00 Chaw thau khoom iav nrawm los ntawm cached hostfile Daws Kev khuam siab ntawm kev sib haumxeeb-> Kev sib tw khiav kev sib tw ---> Pob dhcp.x86_64 12: 4.2.5-42.el7.centos yuav tsum muab ntsia-> Daws kev cuam tshuam tso tseg Kev Ua Kom Sawv Daws Qhov Teeb Meem Zoo ====================================================== ====================================================== =================================== Pob Ntse Qhov Tsim Kho Cov Vev Xaib Laij = Loj ====================================================== ====================================================== ====================== Txhim Kho: dhcp x86_64 12: 4.2.5-42.el7.centos-puag 511k Cov Lus Qhia Sib Hloov ==== ====================================================== ====================================================== ============================ Nruab 1 Pob Tag nrho qhov download tau loj: 511k Installed loj: 1.4 M Puas yog qhov no [y / d / N]: y Rub tej pob khoom: dhcp-4.2.5-42.el7.centos.x86_64.rpm | 511 kB 00:00:00 Kev khiav lag luam kuaj xyuas Kev khiav lag luam sim Ua tiav kev sib hloov Kev ua tiav Ua tiav Kev sib hloov Ua tiav: 12: dhcp-4.2.5-42.el7.centos.x86_64 1/1 Kev Ntsuas: 12: dhcp-4.2.5-42. el7.centos.x86_64 1/1 Nruab Nrab: dhcp.x86_64 12: 4.2.5-42.el7.centos Ua tiav!

[cag @ dns ~] # nano /etc/dhcp/dhcpd.conf
# # DHCP Server Configuration file. # saib /usr/share/doc/dhcp*/dhcpd.conf.example # pom dhcpd.conf (5) tus txiv neej nplooj # ddns-hloov kho-ntu ib ntu; hnub hloov tshiab; ddns-domainname "desdelinux.fan."; ddns-rev-domainname "in-addr.arpa."; tsis quav ntsej cov neeg siv khoom-hloov tshiab; kev cai; kev xaiv ip-forwarding tawm; xaiv sau-lub npe "desdelinux.fan"; # xaiv ntp-servers 0.pool.ntp.org, 1.pool.ntp.org, 2.pool.ntp.org, 3.pool.ntp.org; suav nrog "/etc/dhcp.key"; tsam los ntawm linux.fan. {thawj 127.0.0.1; qhov tseem ceeb dhcp-key; } tsam 10.168.192.in-addr.arpa. {thawj 127.0.0.1; qhov tseem ceeb dhcp-key; } shared-network redlocal {subnet 192.168.10.0 netmask 255.255.255.0 {kev xaiv routers 192.168.10.1; kev xaiv subnet-daim npog qhov ncauj 255.255.255.0; xaiv tshaj tawm-chaw nyob 192.168.10.255; kev xaiv sau-npe-servers 192.168.10.5; kev xaiv netbios-name-servers 192.168.10.5; khwv 192.168.10.30 192.168.10.250; }} # END dhcpd.conf

[cag @ dns ~] # dhcpd -t
Is Taws Nem Cov Txheej Txheem Koom Tes DHCP 4.2.5 Chaw Tsim Cai 2004-2013 Internet Systems Consortium. Qoob loo. Txog cov ntaub ntawv, thov mus saib https://www.isc.org/software/dhcp/ Tsis nrhiav LDAP txij ldap-server, ldap-port thiab ldap-base-dn tsis tau teev nyob hauv cov ntaub ntawv config

[cag @ dns ~] # systemctl pab kom dhcpd
Tsim symlink los ntawm /etc/systemd/system/multi-user.target.wants/dhcpd.service mus /usr/lib/systemd/system/dhcpd.service.

[cag @ dns ~] # systemctl pib dhcpd

[hauv paus @ dns ~] # systemctl xwm txheej dhcpd
● dhcpd.service - DHCPv4 Server Daemon Loaded: loaded (/usr/lib/systemd/system/dhcpd.service; enabled; vendor preset: xiam oob khab) Active: nquag (khiav) txij li dom 2017-01-29 12:04:59 ITS T; 23s dhau los Cov ntaub ntawv: tus txiv neej: dhcpd (8) tus txiv neej: dhcpd.conf (5) Main PID: 2381 (dhcpd) Qhov xwm txheej: "Dispatching packets ..." CGroup: /system.slice/dhcpd.service └─2381 / usr / sbin / dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid Jan 29 12:04:59 dns dhcpd [2381]: Siv Cov Hluav Taws Xob Hauv Is Taws Nem DHCP 4.2.5 Jan 29 12 : 04: 59 dns dhcpd [2381]: Copyright 2004-2013 Internet Systems Consortium. Jan 29 12:04:59 dns dhcpd [2381]: Tag nrho cov cai sau tseg. Jan 29 12:04:59 dns dhcpd [2381]: Yog xav paub, thov mus saib https://www.isc.org/software/dhcp/ Jan 29 12:04:59 dns dhcpd [2381]: Tsis yog nrhiav LDAP txij ldap -server, ldap-port thiab ldap-base-dn tsis tau teev nyob rau hauv cov ntaub ntawv config Jan 29 12:04:59 dns dhcpd [2381]: Sau 0 qiv rau ntawv. Jan 29 12:04:59 dns dhcpd [2381]: Mloog ntawm LPF / eth0 / 52: 54: 00: 12: 17: 04 / redlocal Jan 29 12:04:59 dns dhcpd [2381]: Xa rau ntawm LPF / eth0 / 52: 54: 00: 12: 17: 04 / redlocal Jan 29 12:04:59 dns dhcpd [2381]: Xa rau ntawm Socket / fallback / fallback-net Jan 29 12:04:59 dns systemd [1]: Pib DHCPv4 Neeg rau zaub mov Daemon.

Dab tsi tseem yuav tau ua?

Yooj Yim. Pib lub Windows 7 lossis lwm tus neeg siv nrog Free Software thiab pib sim thiab kuaj xyuas. Peb tau ua nws nrog ob tus neeg: xya.fromlinux.fan y suse-desktop.fromlinux.fanCov. Cov tshev yog raws li nram no:

buzz @ sysadmin: ~ $ tswv xya
xya.fromlinux.fan muaj chaw nyob 192.168.10.30

buzz @ sysadmin: ~ $ tswv xya.fromlinux.fan
xya.fromlinux.fan muaj chaw nyob 192.168.10.30

buzz @ sysadmin: ~ $ dig HAUV TXT xya.fromlinux.fan
.... ;;; COV LUS NUG LICAS:; xya.fromlinux.fan. HAUV TXT ;; COV LUS TEB nqe: xya.desdelinux.fan. 3600 HAUV TXT "31b7228ddd3a3b73be2fda9e09e601f3e9"….

Peb muab lub npe pab pawg "xya" rau "LAGER" thiab rov ua dua. Tom qab rov pib dua qhov tshiab LAGER, peb kos:

buzz @ sysadmin: ~ $ tswv xya
Tus tswv tsev xya tsis pom: 5 (Rov qab)

buzz @ sysadmin: ~ $ tswv xya.fromlinux.fan
Tus tswv tsev xya.desdelinux.fan tsis pom: 3 (NXDOMAIN)

Buzz@sysadmin: ~ $ tswv lager
lager.desdelinux.fan muaj chaw nyob 192.168.10.30

Buzz@sysadmin: ~ $ tswv lager.fromlinux.fan
lager.desdelinux.fan muaj chaw nyob 192.168.10.30

buzz @ sysadmin: ~ $ dig HAUV TXT lager.fromlinux.fan
.... ;;; COV LUS NUG TSHOOJ:; lager.fromlinux.fan. HAUV TXT ;; COV LUS TEB nqe: lager.fromlinux.fan. 3600 HAUV TXT "31b7228ddd3a3b73be2fda9e09e601f3e9"….

Hais txog cov neeg siv sus-desktop:

buzz @ sysadmin: ~ $ host suse-dektop
Tus tswv tsev sus--dektop tsis pom: 5 (REFUSED)

buzz @ sysadmin: ~ $ host suse-desktop
suse-desktop.desdelinux.fan muaj chaw nyob 192.168.10.33

buzz @ sysadmin: ~ $ host suse-desktop.fromlinux.fan
suse-desktop.desdelinux.fan muaj chaw nyob 192.168.10.33

buzz @ sysadmin: ~ $ tswv 192.168.10.33
33.10.168.192.in-addr.arpa sau npe lub npe pointer suse-desktop.desdelinux.fan.

buzz @ sysadmin: ~ $ tswv 192.168.10.30
30.10.168.192.in-addr.arpa sau npe lub npe LAGER.desdelinux.fan.
buzz @ sysadmin: ~ $ dig-x 192.168.10.33
.... ;;; COV LUS NUG NUG:; 33.10.168.192.in-addr.arpa. HAUV PTR ;; COV LUS TEB TSHOOJ: 33.10.168.192.in-addr.arpa. 3600 HAUV PTR suse-desktop.fromlinux.fan. ;; TSO CAI RAU QHOV TSHOOJ: 10.168.192.in-addr.arpa. 10800 HAUV NS dns.fromlinux.fan. ;; NQE LUS LICAS: dns.fromlinux.fan. 10800 HAUV IB 192.168.10.5 ....

buzz @ sysadmin: ~ $ dig HAUV TXT suse-desktop.fromlinux.fan ....
; suse-desktop.desdelinux.fan. HAUV TXT ;; COV LUS TEB nqe: suse-desktop.desdelinux.fan. 3600 HAUV TXT "31b78d287769160c93e6dca472e9b46d73"

;; TSO CAI LUS nqe: desdelinux.fan. 10800 HAUV NS dns.fromlinux.fan. ;; NQE LUS LICAS: dns.fromlinux.fan. 10800 HAUV IB 192.168.10.5
....

Cia peb kuj tau khiav cov lus qhia hauv qab no

[cag @ dns ~] # khawb ntawm linux.fan axfr
; << >> DiG 9.9.4-RedHat-9.9.4-29.el7_2.4 << >> desdelinux.fan axfr ;; kev xaiv thoob ntiaj teb: + cmd los ntawm linux.fan. 10800 HAUV SOA dns.fromlinux.fan. root.dns.fromlinux.fan. 6 86400 3600 604800 10800 los ntawm linux.fan. 10800 HAUV NS dns.fromlinux.fan. los ntawm linux.fan. 10800 IN MX 10 xa.fromlinux.fan. los ntawm linux.fan. 10800 IN TXT "FromLinux, koj qhov blog mob siab rau Software dawb" ad-dc.desdelinux.fan. 10800 IN A 192.168.10.3 blog.desdelinux.fan. 10800 IN A 192.168.10.7 dns.fromlinux.fan. 10800 IN A 192.168.10.5 fileserver.fromlinux.fan. 10800 IN A 192.168.10.4 ftpserver.fromlinux.fan. 10800 IN A 192.168.10.8 LAGER.fromlinux.fan. 3600 HAUV TXT "31b7228ddd3a3b73be2fda9e09e601f3e9"LAGER.fromlinux.fan.   3600 HAUV A 192.168.10.30 xa.fromlinux.fan. 10800 IN A 192.168.10.9 proxyweb.fromlinux.fan. 10800 IN A 192.168.10.6 suse-desktop.fromlinux.fan. 3600 HAUV TXT "31b78d287769160c93e6dca472e9b46d73"suse-desktop.desdelinux.fan. 3600 HAUV A 192.168.10.33 sysadmin.fromlinux.fan. 10800 IN Rau 192.168.10.1 los ntawm linux.fan. 10800 HAUV SOA dns.fromlinux.fan. root.dns.fromlinux.fan. 6 86400 3600 604800 10800

Hauv cov zis saum toj no, peb tau hais txog siab tawv lub TTL -hauv vib nas this- rau cov khoos phis tawj uas muaj IP chaw tso cai los ntawm DHCP cov kev pabcuam uas muaj kev tshaj tawm qhia meej txog TTL 3600 muab los ntawm DHCP. IP kho tas tau coj los ntawm $ TTL ntawm 3H -3 teev = 10800 vib nas this- tshaj tawm hauv SOA cov ntaub ntawv ntawm txhua cheeb tsam cov ntaub ntawv.

Lawv tuaj yeem tshawb xyuas thaj tsam hloov chaw tib qho.

[cag @ dns ~] # khawb 10.168.192.in-addr.arpa axfr

Lwm cov lus txib uas tsis tshua muaj siab ntseeg yog:

[cag @ dns ~] # npe-ntawv xov xwm /var/named/dynamic/db.desdelinux.fan.jnl
[cag @ dns ~] # npe-ntawv xov xwm /var/named/dynamic/db.10.168.192.in-addr.arpa.jnl
[cag @ dns ~] # journalctl -f

Los ntawm txhais tes hloov kho ntawm cov ntaub ntawv aav

Tom qab DHCP los mus rau hauv kev ua si ntawm kev hloov kho thaj tsam cov ntaub ntawv ntawm lub npe huYog tias peb yuav tsum tau hloov kho tus kheej cov ntaub ntawv cheeb tsam, peb yuav tsum ua raws li cov txheej txheem hauv qab no, tab sis tsis tau ua ntej yuav paub me ntsis ntxiv txog qhov kev siv hluav taws xob ua haujlwm li cas rndc ua rau lub npe server tswj.

[cag @ dns ~] # txiv neej rndc
....
       khov [cheeb tsam [chav kawm [saib]]]
           Ncua kev hloov kho tshiab rau thaj chaw hloov chaw. Yog tias tsis muaj cheeb tsam hauv qab, ces tag nrho cov aav raug ncua. Qhov no tso cai kev hloov kho kom tau ua rau thaj chaw ib txwm hloov los ntawm hloov tshiab hloov kho. Nws tseem ua rau cov kev hloov hauv cov ntawv sau cia mus rau hauv cov ntawv sau ceev. Txhua qhov hloov tshiab hloov tshiab yuav raug tsis kam lees thaum thaj chaw ua kom khov.

       thaw [tsam [chav kawm [saib]]]
           Pab kom hloov kho tshiab rau khov khov. Yog tias tsis muaj cheeb tsam teev, ces txhua txoj cai pub dawb yuav qhib. Qhov no ua rau cov neeg rau zaub mov rov ua dua thaj tsam ntawm daim disk, thiab rov rov hloov kho dua tshiab tom qab cov load tau tiav. Tom qab ib cheeb tsam thaws, cov hloov tshiab hloov pauv yuav tsis raug txwv. Yog tias cheeb tsam tau hloov chaw thiab qhov kev xaiv ixfr-los-qhov sib txawv yog qhov siv, ces ntawv xov xwm yuav hloov tshiab kom muaj kev hloov hauv cheeb tsam. Txwv tsis pub, yog tias thaj chaw tau hloov chaw, cov ntaub ntawv xov xwm uas twb muaj lawm yuav raug muab tshem tawm. ….

Dab tsi, koj puas xav tias kuv yuav hloov phau ntawv qhia thoob phau ntawv? ... ib daim thiab lawv mus nrog tsheb. Cov seem kuv tso cia rau koj. 😉

Yeej:

  • rndc khov [tsam [chav kawm [saib]]], tshem tawm qhov hloov pauv hloov pauv ntawm ib cheeb tsam. Yog tias ib qho tsis tau teev meej, txhua tus yuav ua kom khov. Cov lus txib tso cai los ntawm txhais tes ntawm thaj chaw khov lossis txhua thaj chaw. Kev pauv hloov tshiab yuav tsis pom zoo thaum khov.
  • rndc ua [tsam [chav kawm ntawv [saib]]], ua kom cov ntaub ntawv hloov kho hloov tshiab ntawm thaj chaw khov. Tus DNS server rov ua haujlwm thaj tsam ntawm cov ntawv, thiab cov hloov kho hloov tshiab tau rov ua haujlwm tom qab lub sijhawm rov ua tiav.

Ceev faj kom ceev faj thaum peb hloov kho ib cheeb tsam cov ntawv? Tib yam li yog tias peb tau tsim nws, yam tsis nco qab txog nce cov naj npawb txog 1 lossis Teeb meem ua ntej khaws cov ntaub ntawv nrog kev hloov pauv zaum kawg.

Piv Txwv:

[cag @ dns ~] # rndc khov los ntawm linux.fan

[cag @ dns ~] # nano /var/named/dynamic/db.fromlinux.fan
Kuv hloov kho cheeb tsam cov ntaub ntawv rau ib qho laj thawj, tsim nyog lossis tsis tsim nyog. Kuv txuag cov kev hloov pauv

[cag @ dns ~] # rndc thaw los ntawm linux.fan
Ib cheeb tsam rov pib dua thiab thaw tau pib. Txheeb xyuas lub cav kom pom qhov tshwm sim.

[cag @ dns ~] # journalctl -f
Jan 29 14:06:46 dns muaj npe [2257]: thawing cheeb tsam 'desdelinux.fan/IN': txoj kev vam meej
Lub Ib Hlis 29 14:06:46 dns muaj npe [2257]: cheeb tsam los ntawm linux.fan/IN: cheeb tsam ntu (6) tsis hloov. tsam tsis kam hloov mus ua qhev.
Jan 29 14:06:46 dns muaj npe [2257]: thaj chaw desdelinux.fan/IN: loaded txog ntu 6

Qhov yuam kev nyob rau hauv cov zis dhau los, uas tau qhia hauv liab ntawm lub console, vim yog qhov tseeb tias kuv "tsis nco qab" nce cov lej ntawm tus lej yog 1. Yog tias kuv tau ua raws li tus txheej txheem kom raug, cov txiaj ntsig yuav yog:

[cag @ dns ~] # journalctl -f
- Cov cav pib lub hnub 2017-01-29 08:31:32 EST. - Lub Ib Hlis 29 14:06:46 dns muaj npe [2257]: thaj chaw desdelinux.fan/IN: thauj khoom raws sijhawm 6 Jan 29 14:10:01 dns systemd [1]: Pib ntu 43 ntawm cov neeg siv lub hauv paus. Jan 29 14:10:01 dns systemd [1]: Pib ntu 43 ntawm cov neeg siv lub hauv paus. Lub Ib Hlis 29 14:10:01 dns CROND [2693]: (hauv paus) CMD (/ usr / lib64 / sa / sa1 1 1) Jan 29 14:10:45 dns muaj npe [2257]: tau txais kev tswj hwm channel hais kom 'khov los ntawm linux. ntxuam 'Jan 29 14:10:45 dns muaj npe [2257]: khov thaj chaw' desdelinux.fan/IN ': kev vam meej Jan 29 14:10:58 dns muaj npe [2257]: tau txais kev tswj hwm channel hais' thaw desdelinux.fan 'Jan 29 14:10:58 dns muaj npe [2257]: thaw cheeb tsam 'desdelinux.fan/IN': txoj kev vam meej Jan 29 14:10:58 dns muaj npe [2257]: cheeb tsam desdelinux.fan/IN: phau ntawv ceev xwm txheej dhau hnub: tshem cov ntawv journal sau Jan 29 14:10:58 dns lub npe [2257]: thaj chaw desdelinux.fan/IN: muaj cov xov xwm txog 7
  • Cov phooj ywg nyeem ntawv, kuv rov qab hais tias koj yuav tsum ua tib zoo nyeem cov tawm ntawm cov lus txib. Rau qee yam nws cov neeg tsim tawm tau siv haujlwm ntau dhau los ua haujlwm txhua qhov kev hais kom ua, tsis muaj qhov yooj yim npaum li cas.

Abstract

Txog tam sim no peb tau hais txog qhov kev nqis tes ua ntawm DNS - DHCP khub, cov kev pabcuam tseem ceeb thiab tseem ceeb rau kev ua haujlwm zoo ntawm peb cov SME Network, hais txog kev tso cai ntawm cov chaw nyob ruaj khov los ntawm DHCP thiab kev daws teeb meem ntawm lub computer thiab sau npe los ntawm DNS.

Peb mob siab vam tias koj tau nyiam tag nrho cov txheej txheem raws li peb tau ua. Txawm hais tias nws yuav zoo li nyuaj siv lub console, nws yooj yim dua thiab ntau dua kev kawm los ua qhov haujlwm hauv UNIX® / Linux nrog nws cov kev pab.

Lawv zam txim rau kuv rau qhov kev txhais tsis yog ntawm cov ntsiab lus xav, tsim, sau, kho dua, sau dua tshiab, thiab luam tawm ua lus Shakespeare, tsis yog Cervantes. 😉

Tom ntej tom qab

Kuv xav tias me ntsis ntxiv ntawm qhov qub - nrog rau theoretical ntxiv ntawm cov ntaub ntawv DNS - tab sis hauv Debian. Peb tsis tuaj yeem hnov ​​qab qhov faib ntawd, txoj cai?


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.

15 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.   Cristian Merchan said

    Ua tsaug ntau rau koj cov kev qhuas hauv kev sau cov txiaj ntsig zoo. Nws yuav siv ntau rau kuv

  2.   federico said

    Thiab ua tsaug ntau ntau, Cristian, ua raws li kuv thiab rau koj qhov kev ntsuas ntawm no ncej. Kev vam meej!

  3.   Ismael Alvarez Wong said

    Tom qab tau ua thawj zaug saib ntawm tus ncej tshiab no los ntawm Federico, qhov kev tshaj lij tshaj lij uas tau pom thoob plaws hauv "PYMES" series yog qhov pom dua ib zaug; Ntxiv nrog rau qhov kev nthuav dav uas qhia txog koj tus sau ntawm ob qho ntawm cov kev pabcuam tseem ceeb tshaj plaws (DNS thiab DHCP) ntawm txhua lub network. Nyob rau lub sijhawm no thiab tsis zoo li kuv cov lus dhau los, Kuv muaj tus thib 2 tseem tos seb tom qab tau muab tso rau hauv kev coj ua dab tsi tau teev nyob rau hauv no ncej.

  4.   kev 88 said

    Tsis muaj lus hais, pa '400 !!! Fico ua tsaug rau koj vim koj paub zoo heev uas kuv nyeem koj cov ntawv thiab peb tsis tuaj yeem nug ntxiv. Koj pib nrog lub koom haum zoo heev, los ntawm yuav ua li cas rau nruab thiab teeb tsa lub desktop ntawm tus neeg siv, qhov chaw ua haujlwm yog lub hauv paus, nws yog qhov kev nkag siab ntawm cov kev pabcuam hauv network uas koj piav qhia zoo heev. Koj tau nce siab thiab txawm hais tias nws muaj tseeb tias qib tau nce, nws yog qhov tseeb uas koj tau sau thiab tshaj tawm rau cov neeg uas tsawg dua li cov neeg uas tau pib, rau cov uas tau zoo li kuv rau qee lub sijhawm thiab rau kev kawm siab tshaj plaws.
    Sij hawm dhau los Kuv tau xaus qhov uas kuv paub ntau yam twb los txog lawm, txoj kev xav, uas tus nqi rau peb ntau heev kom tau qhov tseeb yooj yim ntawm tsis xav nyeem, vim hais tias kev ua haujlwm yog twb yooj yim dua thaum peb paub tias peb ua dab tsi, vim li cas ???, cov lus nug, qhov twg mus nrhiav thiab yuav ua li cas kom tawm ntawm qhov yuam kev uas ua rau mob taub hau ntau thaum peb tsis paub tias lawv los qhov twg los, tsim nyog qhov tsis tsim nyog.
    Vim li no, kuv tsis xav kom koj tawm ntawm cov kev kawm theoretical uas koj yuav suav nrog txog DNS cov ntaub ntawv hauv kev tshaj tawm tom ntej no raws li koj tau tshaj tawm, ntau tsawg dua thaum nws los txog rau DEBIAN tus hlub thiab tus hlub.
    UA TSAUG ntau ntau thiab peb tseem tos.

  5.   dhunter said

    Zoo li qub Fico! Kuv tos rau Debian version, Kuv tau ua si txhua yam nrog ntawd distro rau xyoo.

  6.   federico said

    Wong: Koj lub tswv yim tom qab nyeem ntawv yog muaj nqis heev. Kuv tos koj cov lus thaum koj kuaj cov ntsiab lus, vim kuv paub tias nws yog qhov koj nyiam ua. 😉

  7.   federico said

    Crespo: Raws li ib txwm, koj cov lus tau txais zoo heev. Kuv pom tias koj tau ntes cov kab dav dav uas kuv tau tsa hauv qhov muaj pes tsawg leeg ntawm cov koob no. Kuv cia siab tias, zoo li koj, ntau tus tau pom. Tsaug rau koj cov lus.

  8.   federico said

    Dhunter: Zoo nyeem koj dua! Koj yuav tsis tau tos ntev. Txog Hnub Monday thaum kawg-ua ntej- nws yuav ua tiav rau kev tshaj tawm. Tsis txhob xav tias nws yooj yim rau kuv los npog peb yam sib txawv, tab sis tus nyeem ntawv Respectable, nug nws. Tsis tsuas yog Debian thiab Ubuntu, tab sis Peb Qhov Txawv Rau Cov SMEs.

  9.   kev 88 said

    Los, yog tias koj tau tshaj tawm nws yog vim tias koj tuaj yeem, peb txhawb koj thiab peb paub tias koj yuav ua raws kab ntawv ntawd.
    Ua ib lub dhunter Kuv tos rau Debian tso tawm nrog cov hniav ntse. Nws yuav zoo yog tias koj tau them me ntsis txog NTP. Sl2 thiab puag sib khawm. Yog tias kuv cov kws qhia ntawv tau qhia kuv txhua yam zoo li ntawd, HAHAJJA, Platinum Degree, HAHAJJA.

  10.   federico said

    Qib ntawm kev nthuav dav hauv cov lus txib tso tawm yog qhov tsim nyog los qhia nws qhov tseem ceeb. Lawv hais ntau. Nws yog qhov tseeb tias ob peb zaj lus hais txog qib kev nthuav dav no, vim tias lawv xav tias lawv yuav yog cov khoom ntev thiab hnyav los nyeem. Zoo, ib feem ntawm SysAdmin txoj haujlwm yog los nyeem cov haujlwm hnyav thiab cov ncauj lus kom ntxaws, tsis yog nyob rau hauv qhov teeb meem xwb, tab sis kuj tiv thaiv lub tshev.

  11.   Ismael Alvarez Wong said

    Nyob zoo Federico, Kuv tau cog lus tseg ua ntej, kom sau qee cov lus hais tom qab tau ua tib zoo kawm kev tshaj lij cov lus nug; Zoo, ntawm no lawv mus ntxiv:
    - Cov txheej txheem zoo ntawm kev hloov ntawm kev tsim lub TSIG yuam sij rau kev hloov kho tshiab DNS los ntawm DHCP, theej qhov tseem ceeb ntawm rndc.key tseem ceeb li dhcp.key, qhov no pom tau tias "yooj yim heev" qhia tau tias lub hom phiaj tsis yog tsuas yog lub cuab yeej ntawm HOWTO-INSTALL-DNS - & - DHCP tab sis qhia peb kom peb xav, 5 HNUB QUB RAU TUS TSWV.
    - Txaus siab heev hauv DNS teeb tsa cov ntaub ntawv, npe.conf, muaj cov kab «tso cai-hloov pauv {localhost; 192.168.10.1; }; » txhawm rau sim cov Domain «desdelinux.fan» tsuas yog los ntawm SysAdmin workstation thiab localhost (tus DNS server nws tus kheej), thiab tseem tso tus yuam sij TSIG los hloov kho DNS ntawm DHCP.
    - Zoo heev rau kev tsim cov chaw ncaj qha thiab kev hloov pauv ntawm DNS nrog ua ke nrog "cov ncauj lus kom ntxaws" piav qhia ntawm lawv cov hom ntaub ntawv, ntxiv rau qhov kev coj ua ntawm cov lus txib "# npe-checkconf -zp" los tshawb xyuas tag nrho cov syntax ntawm cov npe ua ntej rau nws tawv pib dua, nrog rau cov piv txwv ntawm kev khiav cov lus "dig" kom paub tseeb cov ntaub ntawv sib txawv ntawm DNS.
    Cov. Hauv DHCP teeb tsa (siv daim ntawv /etc/dhcp/dhcpd.conf):
    - Yuav ua li cas ntxiv peb lub network hauv nroog nrog nws cov ntau rau cov chaw IP chaw ruaj ntseg los muab, cov lus txhais ntawm lub npe-server, thiab lwm yam; ntxiv rau yuav ua li cas qhia rau DHCP los hloov kho cov ntaub ntawv DNS los ntawm kev siv kab "ddns- ..." hauv nws cov kev teeb tsa.
    Cov. Thaum txhua yam twb ua haujlwm lawm, 5 PIB RAU LUB TSWV CUAB, hauv kev tua cov lus txib "# dig desdelinux.fan axfr" los tshawb xyuas TTL ntawm lub khoos phis tawm ntawm LAN uas muaj IP zoo li qub ntawm cov uas muaj qhov haujlwm IP ua haujlwm zoo.
    Cov. Thaum kawg, GREAT, phau ntawv kev hloov kho ntawm Zones cov ntaub ntawv los ntawm kev ua kom khov rau lawv ua ntej nrog "# rndc freeze desdelinux.fan", tom qab ntawd ua rau kev hloov kho thiab thaum kawg tsis txaus siab rau lawv nrog "# rndc thaw desdelinux.fan"
    Cov. THIAB ZOO TSHAJ PLAWS, TXHUA YAM TAU TAU LOS NTAWM TXHUA YAM.
    Khaws nws yam Fico.

    1.    Joy said

      Nyob zoo,
      Ik net kijken, dit omdat ik probeer te achterhalen hoe het kan dat alles gedeeld en verwijderd wordt op mijn lub computer zelfs mijn foto's. Ik heb totaal geen tswj meer dhau mijn eigen lub computer ntawm mobiel.
      Het zit m dus ook in het dns hauv dhcp. Ik weet echt niet hoe ik dit moet oplossen en het kan verwijderen. Misschien dat iemand mij wenb pab? Dit yog namelijk buiten mij om geinstalleerd. Walgelijk gedrag vind ik het.

  12.   federico said

    Wong: koj cov lus pom ua tiav tsab xov xwm. Tiag tiag, nws qhia tau tias koj tau kawm nws meej. Txwv tsis pub, koj tsis tuaj yeem tawm tswv yim nrog theem ntawm kev nthuav dav uas koj ua. Tsuas yog ntxiv ntawd pub-hloov pauv Nws yog siv feem ntau yog thaum peb muaj DNS Slave thiab peb tso cai hloov chaw ntawm tus tswv ntawm tus tswv mus rau nws. Kuv siv txoj hauv kev ntawd vim tias nws yog qhov yooj yim-rau-siv tus txheej txheem rau kev ua cov tshev tsis muaj phom sij los ntawm ib lub khoos phis tawj xwb. Ua tsaug ntau rau koj qhov kev ntsuam xyuas ntawm 5. Kev txais tos! thiab kuv tseem yuav tos koj hauv kuv cov lus txuas ntxiv.

  13.   IgnacioM said

    Nyob zoo Federico. Kuv paub tias kuv qeeb me ntsis, tab sis kuv xav nug koj ib lo lus.
    Cov txheej txheem no puas pab tau kuv yog tias kuv xav tau taw tes rau ib tus vps server?

    Txhua 15 feeb kuv txais cov kab ke system no:

    DHCPREQUEST ntawm eth0 rau chaw nres nkoj 67 (xid =…)
    DHCPACK los ntawm (xid =…)
    ua txhua yam - txuas hauv 970 vib nas this.

    Thiab los ntawm qhov kuv nkag siab Kuv yuav tsum tsim Ib qho Ntawv Sau Tseg nrog kuv tus sau thiab tus ip ntawm kuv cov neeg rau zaub mov rau siab.

    * Kuv pab zoo siab thiab ua tsaug rau cov lus no, kuv tsis paub tias nws yog qhov kuv tab tom nrhiav tab sis kuv pom nws zoo heev thiab piav tau zoo. Ntxiv rau kuv coj qhov kev pom zoo ntawm "DNS thiab KHI" uas kuv twb tau taug xaiv qee zaum lawm thiab nws zoo li nthuav heev.

    Txais tos los ntawm Argentina!

    1.    antonio ntaus nqi toujague said

      thov hu rau kuv los ntawm valdestoujague@yandex.com