DeRammelaereJelle
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# Bijlessen serverbeheer - Bijlesbureau ## Table of contents [TOC] ## Algemeen De leerling volgt een graduaat informatica aan AP hogeschool in Antwerpen. Hij wil graag ondersteuning voor serverbeheer. Het gaat dan over volgende inhouden: - DNS op Windows Server - DHCP op Windows Server - AGDLP op Windows Server - File sharing op Windows Server - FSMO op Windows Server - Linux DNS (CentOS) - Linux DHCP (CentOS) - Linux file sharing (CentOS) ## Bijles 1 ### Behandelde topics - [x] Sites & Services - [x] DNS-configuratie - [x] DHCP-configuratie ### Algemeen De virtuele machine omgeving ![](https://i.imgur.com/ZCaYOna.png) ### De beheerders groepen toevoegen aan Administrator gebruiker - Voeg de volgende gebruikersgroepen toe aan de Administrator gebruiker ![](https://i.imgur.com/WT0mQJG.png) ### Wijzigen Sites & subnets - Ga naar **Tools** > **Sites & Services** - Wijzig de naam de van de site ![](https://i.imgur.com/GDCT3Qq.png) - Voeg een nieuw subnet toe ![](https://i.imgur.com/ficLqFO.png) - Vul het netwerk adres in: ![](https://i.imgur.com/wxya1N9.png) ### DNS zone - Forward zone → vertaald een domeinnaam naar een IP-adres - Bv. www.test.be → 98.167.2.35 - Gebruiker typt domeinnaam bv google.be (in de browser) - de DNS-server zal de domeinnaam 'google.be' gaan vertalen naar een IP-adres (bv. 172.217.168.195) - De browser zal verkeer sturen naar 172.217.168.195 - Reverse zone → vertaald een IP-adres naar een domeinnaam - Bv. 98.167.2.35 → www.test.be - Waarvoor gebruiken we reverse zone: - Om bijvoorbeeld te verifiëren of onze server geen ander IP heeft dan het dns-record vermeld - Om na te gaan of de koppeling domeinnaam en IP-adres correct is ![](https://i.imgur.com/PoBMw6d.png) - Wanneer een Active Directory Domain Controller geïnstalleerd is, wordt de DNS-server role automatisch geïnstalleerd. - Standaard wordt een Forward lookup zone gemaakt - De domeincontroller en alle andere servers en clients komen hier in: ![](https://i.imgur.com/rQF4bkY.png) - Een Reverse lookup moet altijd zelf worden aangemaakt - Rechtermuisklik > **New Zone...** - Primary zone - ![](https://i.imgur.com/ShstYLF.png) - IPv4 Reverse Lookup Zone - Geef het network id ![](https://i.imgur.com/61Ilzv6.png) - Resultaat ![](https://i.imgur.com/gACEyWA.png) #### Forward lookup zone - Wanneer de DNS forwarder niet werkt, check de configuratie hier: ![](https://i.imgur.com/yxctuEZ.png) ### DHCP - Open **DHCP** - Open **IPv4** - Rechtermuisklik **IPv4** > New Scope... - Naam ingeven ![](https://i.imgur.com/THl2jys.png) - Geef de range van je DHCP scope in: ![](https://i.imgur.com/0BcX1bG.png) - DHCP exclusions - IP-adressen die niet mogen worden uitgedeeld door de DHCP server ![](https://i.imgur.com/JVHecFH.png) ![](https://i.imgur.com/isdv3k6.png) - Lease duration ![](https://i.imgur.com/Rl3TUh3.png) - DHCP Scope Options ![](https://i.imgur.com/z6hLuaZ.png) - Router (Default gateway) ![](https://i.imgur.com/yGs3ilH.png) Klik op **Add** - Domain Name and DNS Servers ![](https://i.imgur.com/TxDGQ2w.png) - WINS servers → mag je overlaten, **Next** - Activate scope now ![](https://i.imgur.com/YR7HDh8.png) - **Finish** Authoriseer DHCP server in Acive Directory - Rechtermuisklik **[ServName]** ![](https://i.imgur.com/niBFuFz.png) De scope is actief nu ![](https://i.imgur.com/zFNU4mx.png) ## Bijles 2 ### Behandelde topics - [x] Configuratie Windows Server Core - [X] Domain replicatie op Windows Server Core - [x] DNS-configuratie op Windows Server Core - [x] DHCP-replicatie Windows Server Core - [X] Verificate OU structuur - De Windows Server core wordt tweede domain controller in het domein - Hiervoor dienen beide Windows Servers te draaien (PFSV1VS & PFSV2VS) ### Configuratie Windows Server Core - Log in op de computer - Voer vervolgens het volgende commando uit: ```powershell sconfig ``` ![](https://i.imgur.com/ucbE5Mr.png) - Stel het IP-adres en DNS-server statisch in → 8 ![](https://i.imgur.com/Wj3EBbv.png) - Kies 1 om de netwerk instellingen aan te passen (voor die netwerkkaart) - Kies opnieuw 1 om het IP van de server in te stellen - Kies S(tatic) ![](https://i.imgur.com/qrIiK3m.png) - Voer het IP-adres, subnetmask, default gateway in ![](https://i.imgur.com/9N6EY1f.png) - Kies voor optie 2 om de DNS-servers in te stellen We geven hier het IP-adres van de eerste domain controller mee (PFSV1VS) → deze is de primaire DNS-server is binnen het domein - 192.168.87.201 ![](https://i.imgur.com/ZT24Luu.png) - Kies voor 4 om de instellingen op te slaan <br> **EXTRA UITLEG**: **Met Default Gateway kan je computer computers van een ander netwerk bereiken Vb. Mijn server heeft IP 192.168.87.201 maar géén default gateway dan kan het enkel toestellen met 192.168.87.x/24 ips bereiken (binnen het lokale netwerk), andere toestellen niet.** **Als de eerste 3 octetten vh IP adres én ook het subnetmask hetzelfde zijn, dan zitten die twee computer in dezelfde netwerk.** ![](https://i.imgur.com/9oC7Rcf.png) - Wijzig de computernaam - Kies optie 2 - Wijzig dit naar **PFSV2VS** - Nog niet meteen herstarten ![](https://i.imgur.com/S7cvtr7.png) - Join het reeds bestaande domein: - Kies optie 1 - Join D(omain) - Naam van het domein opgeven - De loginggegevens van de domein Administrator (bv. POLIFORMA\Administrator) - Herstart de computer → yes ![](https://i.imgur.com/G8ZV4WR.png) - Na het herstarten log je opnieuw in - Voer opnieuw het volgende uit om de instellingen te verifiëren ```powershell sconfig ``` ![](https://i.imgur.com/a6GsI5O.png) - Ga terug naar de PFSV1VS server - Login met de domain adminstrator ![](https://i.imgur.com/KRU90EP.jpg) - In server manager klik op **Manage** > **Add Servers** ![](https://i.imgur.com/j1dA0ae.png) - Onder Active directory klik op **Find Now** ![](https://i.imgur.com/50nhwwu.png) - Voeg de PFSV2VS server toe, door het pijltje te klikken ![](https://i.imgur.com/CFvmkGm.png) Klik op **OK** - Ga naar **All Servers** in **Server Manager** ![](https://i.imgur.com/VeIdVM9.png) - Vanaf hier kunnen we alles configureren op de PFSV2VS. Deze server **MOET** wel draaien! #### Installatie tweede domeincontroller op de PFSV2VS (WS16 Core) - Ga in **Server Manager** > **Manage** - **Add Roles and Features** - Installatie type → Role Base - Selecteer de PFSV2VS server ![](https://i.imgur.com/6cBa7MY.png) - Installeer de volgende services: *Dit is om AD, DHCP en DNS op de CORE server te installeren!* ![](https://i.imgur.com/FAvOWmn.png) - **Next >** klikken op het volgende schermen - Overloop alle instellingen of deze juist zijn Vink **Restart the destination server automatically if required** aan ![](https://i.imgur.com/FVWJGBd.png) - Domain controller configuratie - Klik op **Promote this server to a domain controller** ![](https://i.imgur.com/r3ZoXqU.png) - Voeg de server toe aan bestaand domein Vink **Add a domain controller to an existing domain** aan ![](https://i.imgur.com/BtpqDEq.png) Vul de credentials aan, globale Administrator Klik op **Next** ![](https://i.imgur.com/MzZi4Ll.png) - Vul het DSRM wachtwoord in ![](https://i.imgur.com/9aPsHqF.png) - **Next >** klikken op het volgende scherm - Replicate from > Kies de PFSV1VS server ![](https://i.imgur.com/Grv1pkW.png) - Paths → **Next** - **Next >** klikken op het volgende scherm - Klik op **Install** - Dit kan enge tijd duren... - DHCP configuratie - Kies voor **Complete DHCP configuration** ![](https://i.imgur.com/WsNRZ8o.png) - Auhorize DHCP server in domain > **Next** ![](https://i.imgur.com/UbKOrWG.png) - Vul de Domain gebruikersnaam in bij **Use the following user's credentials** → POLIFORMA\Administrator ![](https://i.imgur.com/RCmqUQz.png) Klik op **Commit** - Sluit het venster met **Close** *ALLE WIZARDS SLUITEN* - Refresh met die cirkel bovenaan met daarin twee pijlen - Active Directory DNS configuratie op PFSV2VS - Ga naar **Tools** > **DNS** in **Server Manager** - Op het DNS icoon, rechtermuisklik op **Connect to DNS Servers** ![](https://i.imgur.com/qactUW2.png) - Kies voor de **The following computer** - Vul de computernaam in: PFSV2VS (**zonder domeinnaam**!) ![](https://i.imgur.com/UkwcupG.png) - Ga naar PFSV2VS, klap de Forward Lookup Zones & Reverse Lookip Zones open - De Forward Lookup Zones zou hetzelfde moeten zijn als op PFSV1VS - De Reverse Lookup Zones zou hetzelfde moeten zijn als op PFSV1VS - De configuratie is in orde. Sluit het venster. - DHCP configuratie op PFSV2VS - Ga naar **Tools** > **DHCP** - Op het DHCP icoon, rechtermuisklik op **Add Server...** - Kies voor **This authorized DHCP server:** → selecteer PFSV2VS ![](https://i.imgur.com/uqtnY9c.png) Klik op **OK** - Klap de eerste server open, Rechtermuisklik op IPv4 - Klik op **Configure Failover...** ![](https://i.imgur.com/SyBDxgL.png) - Selecteer alle DHCP scope → **Next** ![](https://i.imgur.com/COb7gSc.png) - Vul de naam in van de tweede DHCP server = **PFSV2VS** Klik op **Next** ![](https://i.imgur.com/W6PiY41.png) - Kies voor modus: Load Balance Vul een shared secret (wachtwoord) in → bewaar dit goed! Klik op **Next** ![](https://i.imgur.com/97cxa0L.png) - Klik op **Finish** - De failover wordt uitgevoerd en dan op **Close** ![](https://i.imgur.com/Zpn05qk.png) - Refresh het de server (**PFSV2VS** en ook **PFSV1VS** > rechtsklik > **Refresh** ) ![](https://i.imgur.com/GNAxr61.png) - Klap IPv4 en de Scope open, de instellingen zouden hetzefde moeten zijn als op PFSV1VS (inhoud van Address Pool moet bij alle twee zelfde zijn) - Users & OU structuur bekijken - In **Server Manager** ga naar **Active Directory Users and computers** - Maak een basis OU structuur aan als volgt: ![](https://i.imgur.com/7e4YvT1.png) ## Bijles 3 - [x] Overlopen Permanente evaluatie - taak 3 (gebruikersbeheer, GPO's) - [x] SMB SHares - [x] automatische software installatie ### Aanmaken OU's en gebruikers - Maak steeds een hoofdOU aan met de naam van het bedrijf, - Bv. PFAfdelingen - Daarin maak je per departement/afdeling een OU aan, bv. - Directie - Staf - Productie - Vervolgens maak je de gebruikers per OU aa - ### GPO's linken aan users in OU's **GPO's info** - Computer Configuration → wordt op toestel niveau ingesteld en geldt voor alle gebruikers op dat toestel (Windows 10 machine) - User Configuration → wordt op gebruikers niveau ingesteld en geldt voor de gebruiker of gebruikergroep waarop het is toegepast <br> - Stel altijd maar 1 policy per GPO in! <br> - Ga naar Group Policy Management - Maak een nieuwe GPO aan onder **Group Policy Objects**, hier maken we altijd nieuwe policies aan! ![](https://i.imgur.com/Nq5KMqs.png) - Maak nieuwe GPO aan - Rechtermuisklik > **New** - Geef de GPO een duidelijke naam > klik "OK" - Bv. Deny Use Of CMD ![](https://i.imgur.com/21bn7Ka.png) - Dan kunnen de GPO gaan instellen, rechtermuisklik op de GPO > **Edit** - Bijvoorbeeld → Sta het gebruik van CMD NIET toe! - Ga naar **User Configuration** > **Policies** > **Administrative Templates** > **System** > "Prevent access to the command prompt" ![](https://i.imgur.com/o6FN6wM.png) - Rechtermuisklik > **Edit** > zet deze policy op **Enable** en **Yes** > klik dan op **OK** ![](https://i.imgur.com/JbEBhiE.png) *Als die onderste op NO staat, dan kan de gebruiker wél een script schrijven die wel toegang geeft tot command prompt* **Best voor elke policy (verandering in instellingen) telkens een nieuwe aparte Group Policy Pbject (dat is zoals bv Deny Use of Cmd)** - Stel de GPO in om enkel op User niveau te werken - Rechtermuisklik op **GPO status** > **Computer Configuration Settings Disabled** (het moet AAN staan → User configuration) ![](https://i.imgur.com/tVySaIL.png) - Link de GPO met het correcte OU - In dit geval **Staff** - Rechtermuisklik op de OU naam > **Link an existing GPO** > selecteer de GPO, in dit geval **Deny Use Of CMD** > klik op **OK** ![](https://i.imgur.com/QVSDcsT.png) - GPO → Gebruiker mogen hun desktop niet aanpassen - Ga naar **User Configuration** > **Policies** > **Administrative Templates** > **Desktop** > **Desktop** > **Prohibit changes** ![](https://i.imgur.com/fhv3FVM.png) - Plaats dit op **Enabled** ![](https://i.imgur.com/Xr6seXx.png) - ![](https://i.imgur.com/SLDLb0x.png) *Dees wil gewoon zeggen dat het enkel voor de gebruikers van toepassing waarop die user configuration werd toegepast en op niemand anders => User Configuration = aan; Computer configuration = UIT* **Policy linken aan productie OU** ![](https://i.imgur.com/zBy8Aha.png) ![](https://i.imgur.com/9D2fJvK.png) ![](https://i.imgur.com/K07wlZw.png) - GPO → Gebruikes bureaubladachtergrond staat vast ingesteld - Hiervoor hebben we een Windows Share nodig - Op de C: schijf, maak een map aan met de naam **#SMBShares** - Maak daar een submap aan met als naam **bureaubladachtergronden** - Op de foldere Properties > **Advanced Sharing** > **Share this folder** map als **hidden** SMB-share → **bureaubladachtergronden$** ( dollarteken op het einde betekent Hidden Share), ![](https://i.imgur.com/ZWKIbr1.png) - Open de Permissions > **Everyone Full Control** ![](https://i.imgur.com/8PG3nHx.png) Hier stellen we de beveiliging op Share niveau in - Kopieer het UNC path: bv. `\\PFSV1VS\bureaubladachtergronden$\` - Onder Group Policy Management, maak een nieuwe GPO aan, met als naam Desktop Wallpaper Flowers - Ga naar **User Configuration** > **Policies** > **Administrative Templates** > **Desktop** > **Desktop** > **Desktop Wallpaper** - *Bij Wallpaper name dan bv: \\PFSV1VS\bureaubladachtergronden$\Bloem-achtergrond.jpg* ![](https://i.imgur.com/aX8SMsC.png) - Sluit dit venster - Nu passen we de rechten aan op de GPO, ga naar de GPO naar **Delegation** vervolgens rechts onderaan op **Advanced** - Bij **Authenticated Users** verwijder de **READ** & **Apply group policy** (bij allebei moet vinkje weg) ![](https://i.imgur.com/M78vVJ5.png) - Klik vervolgens op **Add** en voeg de gebruiker *Yolanda Brandts* toe ![](https://i.imgur.com/S3BWTmJ.png) - Zij heeft toegang tot de **READ** & **Apply group policy** (bij allebei moet vinkje aan staan) nodig ![](https://i.imgur.com/MyiojPU.png) - ![](https://i.imgur.com/NLHrJlk.png) **OPDRACHT** - Onder Group Policy Management, maak een nieuwe GPO aan, met als naam Desktop Wallpaper Car *ZELFDE STAPPEN ALS HIERBOVEN MAAR DAN VOOR HENK PELL!* ### Automatische software installatie - Op de C: schijf, maak een nieuwe submap aan met als naam **software** - Op de folder Properties > **Advanced Sharing** > **Share this folder** map als **hidden** SMB-share → **software$** ( dollarteken op het einde betekent Hidden Share), - Open de Permissions > **Everyone Full Control** Hier stellen we de beveiliging op Share niveau in ![](https://i.imgur.com/Et8767e.png) - Kopieer het UNC path: bv. `\\PFSV1VS\software$\` ![](https://i.imgur.com/v2CiLBF.png) - Onder Group Policy Management, maak een nieuwe GPO aan, met als naam Install Antivirus - Ga naar **Computer Configuration** > **Software Settings** > **Software Installations** - Rechtermuisklik → **New** > **Package** ![](https://i.imgur.com/5P3oenO.png) - Voeg hier de MSI installer toe vanop de `\\PFSV1VS\software$\` share ![](https://i.imgur.com/c2VtLks.png) - Plaats de installatie op **Assigned** ![](https://i.imgur.com/MJVYNRP.png) ![](https://i.imgur.com/xjgA123.png) ![](https://i.imgur.com/UBDdzxT.png) - Maak in Active Directory Users and Computers (in Server Manager) een OU met als naam Computers aan - Plaats alle computers hier in ![Uploading file..._ywin3r8re]() **OPDRACHT → WANNEER UW COMPUTER IN HET DOMEIN ZIT, VERPLAATS HEM NAAR DIT OU! - Link de GPO met de correcte Computer in het Computer OU [SCREENSHOT] TEST ALLE POLICIES UIT! ### Windows 10 client in het domein plaatsen - Ga naar **Windows Settings** > **Accounts** > **Access work or school** ![](https://i.imgur.com/wowMQ9r.png) - Klik op **Connect** ![](https://i.imgur.com/ImWSX1P.png) - Join this device to a local Active Directory domain ![](https://i.imgur.com/PtRxGCk.png) - Vul de domeinnaam in: ![](https://i.imgur.com/1Pvax2I.png) - Log in met de domaingebruiker (POLIFORMA\Administrator) - Skip het toevoegen van uw computer - Herstart de computer om in het domein te zitten - Log na het herstarten in met een domein gebruiker (bv. Ybrandt@PoliForma.local) ## Bijles 4 - Linux machine in Active Directory ### Network - Als je geen IP adres krijgt, voer volgende commando's uit: - Release de IP configuratie ```bash ~:$ sudo dhclient -r ``` - Renew de IP configuratie ```bash ~:$ sudo dhclient -v ``` - Als er een DHCP server is (Windows DHCP server), dan zal de client een IP-adres krijgen. ### Centos AD - Installeer volgende packages ```bash ~:$ sudo yum install sssd realmd oddjob oddjob mkhomedir adcli krb5 workstation openldap clients -y ``` - Wijzig hostname ```bash ~:$ sudo hostnamectl set-hostname DLLSV1VS ~:$ sudo vim /etc/hosts 127.0.0.1 DLLSV1VS ~:$ sudo reboot ``` - Check welke DNS server je gebruikt ```bash ~:$ cat /etc/resolv.conf ``` - Wijzig DNS server (indien dit niet de Windows Server is) & herstart network interfaces *als je dat opent in terminal met cat, moet daar het IP-adres vd Windows server staan == dus in die geval moet je die 3 commands NIET uitvoeren* ```bash ~:$ sudo nmcli con modify ens33 ipv4.dns "[IPVSServer]" ~:$ sudo nmcli con down ens33 ~:$ sudo nmcli con up ens33 ``` - Installeer bind-utils (indien niet geïnstalleerd) ```bash ~:$ sudo yum install bind-utils -y ``` - Verifieer of je de domain controller kunt bereiken ```bash ~:$ nslookup PFSV1VS.poliforma.local ``` - Voer volgende commando's uit om te verifiëren dat de host de standaard SRV records can resolven: ```bash ~:$ host -t SRV _kerberos._udp.poliforma.local. ... ~:$ host -t SRV _ldap._tcp.poliforma.local. ``` - Check de datum en tijd, stel desnoods manueel correct in ```bash ~:$ date ~:$ sudo date -s '2021-06-03 11:17:00' ``` - Join de server in het domain ```bash ~:$ sudo realm join poliforma.local -U Administrator ``` - Verifieer dit op de Windows Server - Ga naar **Server Manager** > **Active Directory User & Computers** > ga naar de map **Computer** - Daar zie je de net toegevoegde server ![](https://i.imgur.com/KQ6eikh.png) - Op de CentOS machine → log uit met de lokale gebruiker - Log in met een domein gebruiker: ![](https://i.imgur.com/CC7gt3a.png) - Je bent nu ingelogd met een gebruiker uit Active Directory -*bij username bij het inloggen: **Ybrandts@poliforma.local*** ![](https://i.imgur.com/K1LnMIl.png) ### DNS op Centos - Log terug in met de lokale administratieve gebruiker op de CentOS macine - Installeer de DNS server (BIND9) ```bash ~:$ sudo yum install bind bind-utils -y ``` - Configuratie DNS server - We wijzigen de named.conf file ```bash ~:$ sudo nano /etc/named.conf ``` - Onder options zien we `listen-on port 53 { 127.0.0.1;}` Dit wijzigen we naar `listen-on port 53 { 127.0.0.1;[IPAdressLinuxServer];}` - Plaats de IPv6 regel in commentaar `listen-on-v6 port 53 { ::1;}` → `#listen-on-v6 port 53 { ::1;}` - Voeg het network adres toe bij allow-query → `allow-query { localhost; [NetworkAddress];}` - dnssec → uitschakelen ```bash dnssec-enable no; dnssec-validation no; ``` - Voorbeeld ![](https://i.imgur.com/KUrc7aN.png) - Sla dit bestand op - We maken de DNS zone file ```bash ~:$ sudo nano /var/named/dynamic/fwd.zonefile ``` - Hierin plaatsen we volgende configuratie ```bash zone "Forward.zone" IN { type master; file "dynamic/fwd.zonefile;"; allow-transfer {[IPAdressLinuxServer];}; allow-update {[NetworkAddress];}; } ``` - We maken een slaves DNS zone file aan, dit zal updates ontvangen van onze Active Directory Domain Controller ```bash ~:$ sudo nano /var/named/slaves/slave.zonefile ``` - Hierin plaatsen we volgende configuratie ```bash zone "Slavedns.zone" IN { type slave; file "slaves/slave.zonefile;"; masters {[IPAdressWS19ADServer];}; masterfile-format text; } ``` - We wijzigen de DNS forward zone file ```bash ~:$ sudo nano /var/named/poliforma.local ``` - Hierin plaatsen we volgende configuratie ```bash $TTL 3H poliforma.local. IN SOA PFSV1VS.poliforma.local. root.poliforma.local.( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H) ; minimum NS PFSV1VS.poliforma.local. PFSV1VS A 192.168.87.201 ``` **reverse: van wie is ip adres ----- geeft naam terug** **forward: van wie is naam --- geeft ip terug** - We wijzigen de DNS reverse zone file ```bash ~:$ sudo nano /var/named/rev.87.168.192 ``` - Hierin plaatsen we volgende configuratie ```bash $TTL 3H poliforma.local. IN SOA PFSV1VS.poliforma.local. root.poliforma.local.( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H) ; minimum @ IN NS PFSV1VS.poliforma.local. 201 IN PTR PFSV1VS.poliforma.local. ``` - De bind service herstarten ```bash ~:$ sudo service named start ``` - De bind service verifiëren ```bash ~:$ sudo service named status ``` - De configuratie testen ```bash IP MOET NI TUSSEN HAAKJES ~:$ dig @[IPAdressLinuxServer] PFSV1VS.poliforma.local ~:$ dig PFSV1VS.poliforma.local die 2 moeten dezelfde uitkomst hebben ``` **Belangrijk** → DNS luistert op poort 53/UDP voor standaard queries, 53/TCP voor extra functionaliteiten binnnen MD DNS ### DHCP op Centos - Log terug in met de lokale administratieve gebruiker op de CentOS macine - Installeer de DHC¨P server (isc-dhcp) ```bash ~:$ sudo yum install dhcp-server -y ``` - Configuratie in te stellen in dhcpd.conf ```bash ~:$ sudo nano /etc/dhcp/dhcpd.conf ``` ```bash # Network card DHCPDARGS="ens33"; option domain-name "poliforma.local"; option domain-name-servers [IPAdressLinuxServer]; default-lease-time 600; max-lease-time 700; ddns-updates on; ddns-update-style interim; allow client-updates; authoritative; log-facility local7; subnet 192.168.87.0 netmask 255.255.255.0 { range 192.168.87.10 192.168.87.100; option routers 192.168.87.2; option domain-name "poliforma.local"; option domain-name-servers [IPAdressLinuxServer]; } ``` - Herstart de DHCP service ```bash ~:$ sudo systemctl restart dhcpd ``` - Verifieer de status ```bash ~:$ systemctl status dhcpd ``` - Verifieer de gebruikte poorten ```bash ~:$ sudo ss -tulpn ``` **Belangrijk** - DHCP server → poort 67/UDP - DHCP client → poort 68/UDP ### SMB en NFS op Centos - Installeer samba (smb) ```bash ~:$ sudo dnf install samba -y ``` - Start de service meteen en ook bij het opstarten ```bash ~:$ sudo systemctl enable --now smb nmb ``` - Verifieer de status ```bash ~:$ sudo systemctl status smb nmb ``` - Map aanmaken ```bash ~:$ mkdir Lshare ``` - Wijzig de samba configuratie ```bash ~:$ sudo nano /etc/samba/smb.conf ``` - Hier vinden we 4 secties - global - homes - printers - print$ - We passen de `[global]` aan ```bash workgroup = poliforma.local password server = pfsv1vs.poliforma.local realm = poliforma.local security = ads hosts allow = 192.168.87.0/24 map to guest = bad user guest ok = yes ``` - We voegen een sectie genaamd `[Lshare]`. Dit is de configuratie voor onze smb share. Plaats dit onderaan ```bash [Lshare] comment = smb share inside domain path = /home/villo/Lshare/ browseable = yes guest ok = no writable = yes ``` - We dienen de samba group rechten te geven op de map `/home/villo/Lshare/` ```bash ~:$ chmod -R 777 /home/villo/Lshare/ ``` - Label de smb share labelen ```bash ~:$ sudo chcon -t samba_share_t /home/villo/Lshare/ -R ``` - Test de configuratie ```bash ~:$ testparm ``` - Herstart de smb service en extra services ```bash ~:$ sudo systemctl restart smb nmb winbind oddjobd ``` - Verifieer de firewall ```bash ~:$ sudo firewall-cmd --state ~:$ sudo firewall-cmd --permanent --add-service=samba ~:$ sudo systemctl reload firewalld ~:$ sudo firewall-cmd --list-services ``` - Test de share op de Windows Client - Navigeer naar het IP-adres van de Linux Server in Windows Explorer `\\[IPAdressLinuxServer]` - Guide samba in AD - Guide NFS in AD - Gebruik van Git in PowerShell

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully