Installation DNS DHCP Sous Linux


Ralis par - Boutarfa Younes Samedi 06042013 20 06
Mthode 1 non permanente younalocalhost su - Password rootlocalhost PATHPATHsbin Mthode 2 permanent younalocalhost su - Password rootlocalhost rootlocalhost ls -al total 200 drwxr-x--- 7 root root 4096 jan 3 1604 drwxr-xr-x 23 root root 4096 jan 3 1554 -rw------- 1 root root 1087 jan 3 1545 anaconda-kscfg -rw-r--r-- 1 root root 24 dc 3 2004 bashlogout -rw-r--r-- 1 root root 191 dc 3 2004 bashprofile -rw-r--r-- 1 root root 176 dc 3 2004 bashrc -rw-r--r-- 1 root root 100 dc 3 2004 cshrc rootlocalhost gedit bashprofile bashprofile Get the aliases and functions if -f bashrc then bashrc fi User specific environment and startup programs PATHPATHHOMEbinsbin export PATH unset USERNAME rootlocalhost source bashprofile Configuration statique des interfaces rseau 1 Configuration statique non permanente ifconfig nom-interface adresseIP netmask masque exemple ifconfig eth0 19216811 netmask 2552552550 up 2Configuration statique permanente diter le fichier ifcfg-eth0 mthode1 gedit etcsysconfignetwork-scriptsifcfg-eth0
mthode2 younalocalhost cd etcsysconfignetwork-scripts younalocalhost ls younalocalhost vi ifcfg-eth0 fichier par dfaut DEVICEeth0 BOOTPROTOdhcp ADDR000C29928CC8 ONBOOTyes TYPEEthernet Aprs la modification DEVICEeth0 BOOTPROTOstatic IPADDR192168401 NETMASK2552552550 GATEWAY192168401 NETWORK192168400 ADDR000C29928CC8 ONBOOTyes TYPEEthernet 3mthode configuration graphique de ladresse ip Environnement de bureau ---gt paramtre de systme --gt rseau --gt modifier --gt configuration statiquement pour redmarre service de la carte rseau rootlocalhost service network restart
04012013 Installation de dns creation des zones direct et inverse rootserver RPMS cd mediacdrecorderFedoraRPMS rootserver RPMS find bind Pour installer le dns taper rootserver RPMS rpm -ivh bind-931-4i386rpm pour verifier si un package est dj installer rootserver RPMS rpm -q bind-931-4i386rpm diter fichier de configuration DNS rootserver RPMS gedit etcnamedconf Zone de recherche directe zone quottrimaquot IN la zone trima type master cest une zone premiere file quottrimazonequot le chemin du fichier de zone Crer un fichier rootserver named gedit trimazone Cpier le contenu de localhostzone dans trimazone rootserver named cat localhostzone gt trimazone
Editer Le fichier de zone rootserver named gedit trimazone ----- TTL 86400 IN SOA serveurtrima roottrima 42 serial d adams 3H refresh 15M retry 1W expiry 1D minimum IN NS serveurtrima serveurtrima IN A 19216841 c1trima IN A 19216842 c2trima IN A 19216843 www IN CNAME serveurtrima Ajouter les lignes suivantes au fichier etcresolvconf La ligne search prcise dans quel domaine effectuer les requtes DNS La ligne nameserver prcise ladresse IP du serveur DNS rootserver named gedit etcresolvconf search trima nameserver 19216841 nameserver 172001 Il faut alors relancer le service named laide de la commande rootserver named service named start Dmarrage de named OK La commande NSlookup La commande NSlookup permet de diagnostiquer et dinterroger en mode interactive le serveur DNS Elle permet aussi de visualiser tous les enregistrements dune zone rootserver named nslookup gt c1trima Server 19216841 Address 1921684153 Name c1trima Address 19216842 gt
rootserver named gedit etcsysconfignetwork Le fichier hosts Le fichier host est un fichier qui se trouve dans chaque machine disposant de sa propre base de donnes de noms qui contient les mappages entre les noms et les adresses IP Sur des rseaux importants cette base de donnes duplique nest pas simple maintenir Dans Linux le fichier hosts se trouve dans le rpertoire suivant etchosts Pour configurer le fichier hosts Ouvrez le fichier Saisissez les lignes faisant correspondre ladresse ip au nom dhote rootserver named gedit etchosts Ajouter les lignes suivantes au fichier etcresolvconf La ligne search prcise dans quel domaine effectuer les requtes DNS La ligne nameserver prcise ladresse IP du serveur DNS rootserver named gedit etcresolvconf 18012013 Zone de recherche inverse rootserver gedit etcnamedconf zone quot4168192in-addrarpaquot IN type master file quottrimayounaquot allow-update none rootserver cd varnamed rootserver named touch trimayouna rootserver named more localhostzone gt trimayouna
Editer Le fichier de zone rootserver named gedit trimayouna TTL 86400 IN SOA servertrima roottrima 42 serial d adams 3H refresh 15M retry 1W expiry 1D minimum IN NS servertrimayouna 1 IN PTR servertrimayouna 2 IN PTR c1trimayouna rootserver named service named restart rootserver named service named start rootserver named nslookup gt 19216841 Server 19216841 Address 1921684153 14168192in-addrarpa name servertrima
Configuration de serveur primaire et secondaire Dans le server secondaire --------- methode1 younaserver ls -l var rootserver ls -l varnamed rootserver chmod gw varnamed rootserver ls -l var drwxr-xr-x 2 root root 4096 mai 23 2005 local drwxrwxr-x 4 root lock 4096 jan 31 1648 lock drwxr-xr-x 9 root root 4096 jan 31 1651 log lrwxrwxrwx 1 root root 10 jan 3 1534 mail -gt spoolmail drwxr-x--- 4 root named 4096 jan 31 1719 named drwxr-xr-x 2 root root 4096 mai 23 2005 nis drwxr-xr-x 2 root root 4096 mai 23 2005 opt rootserver chmod gw varnamed rootserver service named restart Arrt de named OK ADmarrage de named OK rootserver service dhcpd restart Internet Systems Consortium DHCP Server V302 Copyright 2004 Internet Systems Consortium All rights reserved For info please visit httpwwwiscorgswdhcp Arrt de dhcpd OK Dmarrage de dhcpd OK rootserver ls varnamed data ista-bzmayounajnl ista-bzmazonejnl namedbroadcast namedlocal ista-bzmayouna ista-bzmazone localdomainzone namedca namedzero ista-bzmayouna ista-bzmazone localhostzone namedip6local slaves
----------- methode2 dans le server primaire rootserver2 named gedit etcnamedconf zone quotefmmaquot IN la zone trima type master cest une zone premiere file quotefmmazonequot le chemin du fichier de zone Allow-transfer1921681020 adresse de server secondaire Dans le server secondaire rootserver2 named gedit etcnamedconf zone quotefmmaquot IN Nom de zone type slave type de serveur secondaire file quotslavesefmmazonequot fichier de zone masters 1921681010 ladresse Ip du serveur primaire allow-update none mise jour DNS rootserver2 named service named restart Pour verifier si le fichier de la zone si copier ou non dans server secondaire rootserver2 named ls varnamedslaves efmmazone rootserver2 named rootserver2 named nslookup
gt serverefmma Server 1921681020 Address 192168102053 Name serverefmma Address 1921681010 gt Configuration de dhcp 822013 rootserver RPMS cd mediacdrecorderFedoraRPMS rootserver RPMS find dhcp dhcp-302-12i386rpm dhcp-devel-302-12i386rpm dhcpv6-010-13i386rpm dhcpv6client-010-13i386rpm Pour installer le package dhcp rootserver RPMS rpm -ivh dhcp-302-12i386rpm attention dhcp-302-12i386rpm Entte signature V3 DSA NOKEY key ID 4f2a6fd2 Prparation 100 1dhcp 100 rootserver RPMS pour vrifier rootserver RPMS rpm -q dhcp-302-12i386rpm le paquetage dhcp-302-12i386rpm nest pas install rootserver RPMS copier le fichier rootserver dhcp-302 cd usrsharedocdhcp rootserver dhcp-302 gedit dhcpdconfsample rootserver dhcp-302 cp dhcpdconfsample etcdhcpdconf rootserver dhcp-302 gedit etcdhcpdconf ddns-update-style interim
ignore client-updates subnet 19216830 netmask 2552552550 --- default gateway option routers 19216831 option subnet-mask 2552552550 option nis-domain quotdomainorgquot option domain-name quottubtechnomaquot option domain-name-servers 19216831 option time-offset -18000 Eastern Standard Time option ntp-servers 19216811 option netbios-name-servers 19216811 --- Selects point-to-point node default is hybrid Dont change this unless -- you understand Netbios very well option netbios-node-type 2 range dynamic-bootp 19216836 1921683254 default-lease-time 21600 max-lease-time 43200 we want the nameserver to appear at a fixed address host ns next-server marvinredhatcom hardware ethernet 12345678ABCD fixed-address 20717542254 rootserver service dhcpd start Dmarrage de dhcpd ----- 14022013 Server afficher les enregistremant de dhcp rootserver gedit varlibdhcpdhcpdleases Client
Sous linux a ne va pas marcher car les machines linux nenvoient pas leur nom de machine par dfaut Pour rsoudre ce problme il faut crer un fichier appel dhclientconf Le fichier doit tre dans la directive etc Ce fichier contiendra au moins cette ligne send host-name nommachine Example crer un fichier rootserver2 touch etcdhclientconf rootserver2 gedit etcdhclientconf pour vrifier si le client est membre dans le domain ou non rootserver2 cat etcresolvconf Example 2 Server Configurer le serveur DHCP pour faire les mises jour dynamiques de DNS send host-name quotclient2quot generated by sbindhclient-script search tubtechnoma nameserver 19216831 rootserver2 rootserver2 network-scripts dhclient rootserver2 network-scripts cat etcresolvconf generated by sbindhclient-script search tubtechnoma nameserver 19216831 rootserver2 network-scripts rootserver2 network-scripts cat etcresolvconf generated by sbindhclient-script search tubtechnoma nameserver 19216831 rootserver2 network-scripts echo 0 gt etcresolvconf rootserver2 network-scripts cat etcresolvconf rootserver2 network-scripts cat gt etcresolvconf rootserver2 network-scripts cat etcresolvconf rootserver2 network-scripts dhclient -r
Pour cela vous devez modifier les deux fichiers de configuration etcnamedconf et etcdhcpconf Pour le fichier etcnamedconf Pour le fichier etcdhcpdconf zone quotista-bzmaquot in type master file quotista-bzmazonequot allow-update 192168201 ladresse de serveur DNS
22022013 Le routage Server rootserver ipv4 more procsysnetipv4ipforward rootserver ipv4 pour configurer routage non permanente rootserver ipv4 echo 1 gt procsysnetipv4ipforward rootserver ipv4 more procsysnetipv4ipforward 1 rootserver ipv4 pour activer le routage dune maniere permanente ouvrir le fichier le fichier etcsysctlconf et modifier la variable netipv4ipforward mettre la valeur 1 avant la modification rootserver gedit etcsysctlconf Kernel sysctl configuration file for Red Hat Linux For binary values 0 is disabled 1 is enabled See sysctl8 and sysctlconf5 for more details Controls IP packet forwarding netipv4ipforward 0 Controls source route verification netipv4confdefaultrpfilter 1
aprs la modification Resumer routage permanente rootserver gedit etcsysctlconf Kernel sysctl configuration file for Red Hat Linux For binary values 0 is disabled 1 is enabled See sysctl8 and sysctlconf5 for more details Controls IP packet forwarding netipv4ipforward 1 Controls source route verification netipv4confdefaultrpfilter 1
------- 01042013 Routage statique Server1 Server2 younaserver su - Password rootserver gedit etcsys sysconfig sysctlconf syslogconf rootserver gedit etcsysctlconf rootserver cat procsysnetipv4ipforward rootserver echo 1 gt procsysnetipv4ipforward rootserver cat procsysnetipv4ipforward 1 rootserver more procsysnetipv4ipforward rootserver gedit etcsysctlconf For binary values 0 is disabled 1 is enabled See sysctl8 and sysctlconf5 for more details Controls IP packet forwarding netipv4ipforward 1 Controls source route verification
Server1 Ajouter une route statique rootserver route add net 192168200 netmask 2552552550 gw 192168402 Server2 rootserver2 route add net 192168300 netmask 2552552550 gw 192168401 Supprimer une route statique sur le deux machine rootserver2 route del net 192168300 netmask 2552552550 Afficher la table de routage rootserver2 route younaserver su - Password rootserver gedit etcsys sysconfig sysctlconf syslogconf rootserver gedit etcsysctlconf rootserver cat procsysnetipv4ipforward rootserver echo 1 gt procsysnetipv4ipforward rootserver cat procsysnetipv4ipforward 1 rootserver more procsysnetipv4ipforward rootserver gedit etcsysctlconf For binary values 0 is disabled 1 is enabled See sysctl8 and sysctlconf5 for more details Controls IP packet forwarding netipv4ipforward 1 Controls source route verification
Example Routage dynamique Pour configurer le routage dynamique on doit installer le package quagga-0983-2i386rpm rootserver cd mediacdromFedoraRPMS rootserver RPMS find qua quagga-0983-2i386rpm quagga-contrib-0983-2i386rpm quagga-devel-0983-2i386rpm rootserver RPMS rpm -ivh quagga-0983-2i386rpm attention quagga-0983-2i386rpm Entte signature V3 DSA NOKEY key ID 4f2a6fd2 Prparation 100 1quagga 100 rootserver RPMS
Pour configurer le fichier etcquaggazebraconf rootserver more etcquaggazebraconf Example rootserver gedit etcquaggazebraconf pour configurer le protocole de routage Rip crer le fichier de configurtion etcquaggaripdconf rootserver touch etcquaggaripdconf configuration rootserver gedit etcquaggaripdconf hostname nom-serveur password mot-de passe hostname server password paword hostname server password paword
pour configurer le protocole de routage ospf crer le fichier de configurtion etcquaggaospfdconf rootserver touch etcquaggaospfdconf configuration rootserver gedit etcquaggaospfdconf service telnet installer le package xinetd Installer le package telnet-server hostname server password paword rootserver cd mediacdromFedoraRPMS rootserver RPMS find xinetd xinetd-2313-6i386rpm rootserver RPMS rpm -ivh xinetd-2313-6i386rpm attention xinetd-2313-6i386rpm Entte signature V3 DSA NOKEY key ID 4f2a6fd2 Prparation 100 1xinetd 100 rootserver RPMS rootserver cd mediacdromFedoraRPMS rootserver RPMS find telnet-server telnet-server-017-35i386rpm rootserver RPMS rpm -ivh telnet-server-017-35i386rpm attention telnet-server-017-35i386rpm Entte signature V3 DSA NOKEY key ID 4f2a6fd2 Prparation 100 1telnet-server 100 rootserver RPMS
modifier le fichier etcxinetddtelnet Modifier le fichier etcxinetddtelnet on ajoute la ligne port 23 et modifier le parametre disable on met no Ajouter un utilisateur avec un mot de passe rootserver useradd -m sara rootserver passwd sara Changing password for user sara New UNIX password BAD PASSWORD it is based on a dictionary word Retype new UNIX password passwd all authentication tokens updated successfully rootserver dmarrer le service xinetd tester laccer depuis une machine client younaserver2 telnet telnetgt open 192168302 Trying 192168302 Connected to 192168302 192168302 Fedora Core release 4 Stentz Kernel 2611-11369FC4 on an i686 login sara Password Last login Tue Mar 19 222413 from 192168303 saraserver2 mkdir zhour younes omar abdo default on description The telnet server serves telnet sessions it uses unencrypted usernamepassword pairs for authentication service telnet flags REUSE sockettype stream wait no user root server usrsbinintelnetd logonfailure USERID disable yes default on description The telnet server serves telnet sessions it uses unencrypted usernamepassword pairs for authentication service telnet flags REUSE sockettype stream wait no user root server usrsbinintelnetd logonfailure USERID disable no port 23 rootserver RPMS service xinetd start Dmarrage de xinetd OK rootserver RPMS
192168302 gt ladresse de servuer Pour fermer la ssesion u1server2 exit verfier la cration des rep zhour younra a partir le serveur rsumer la configuration de rip sur R1 et R2 Server1 Server2 - installer xinetd et telnet-server - installer quoagga - creation fichier de configuration ripdconf - demarrerg xinetd zebra et ripd - configurer le routage rip taper la commande telnet 127001 2602 ou telnet 172001 ripd - configurer les deux routeurs Mthode 1 younaserver su - u1 Password u1server ls zhour younes omar abdo saraserver Mthode 2 rootserver RPMS ls homeu1 zhour younes omar abdo rootserver
rootserver RPMS cd mediacdromFedoraRPMS rootserver RPMS rpm -ivh quagga-0983-2i386rpm attention quagga-0983-2i386rpm Entte signature V3 DSA NOKEY key ID 4f2a6fd2 Prparation 100 1quagga 100 rootserver RPMS gedit etcquaggaripdconf rootserver RPMS rpm -ivh xinetd-2313-6i386rpm attention xinetd-2313-6i386rpm Entte signature V3 DSA NOKEY key ID 4f2a6fd2 Prparation 100 1xinetd 100 rootserver RPMS rpm -ivh telnet-server-017-35i386rpm attention telnet-server-017-35i386rpm Entte signature V3 DSA NOKEY key ID 4f2a6fd2 Prparation 100 1telnet-server 100 rootserver gedit etcxinetddtelnet rootserver service zebra start Dmarrage de zebra Nothing to flush OK rootserver service ripd start Dmarrage de ripd Ok rootserver telnet 127001 ripd Trying 127001 Connected to 127001 127001 Escape character is Hello this is Quagga version 0983 User Access Verification Password servergt enable server conf t serverconfig router rip serverconfig-router version 2 serverconfig-router network 19216820024 serverconfig-router network 19216830024 serverconfig-router hostname server password paword disable no port 23
تحميل

PDF

2260 مشاهدة.

Ayoub Moutii

Ayoub Moutii

أرسلت .



كلمات مفتاحية :
installation dns dhcp sous linux
installation dns dhcp sous linux wetud docs ...