Internet Information Server (IIS) onder Windows --- ## πŸ”§ **Stap 1: Installeer IIS en vereiste onderdelen via Server Manager** 1. **Open Server Manager** * Start β†’ Server Manager (of automatisch bij login) 2. **Voeg Rollen en Functies toe** * Klik rechtsboven op **"Manage"** β†’ **"Add Roles and Features"** 3. **Kies installatie-type** * Selecteer: **Role-based or feature-based installation** * Klik op **Next** 4. **Kies de juiste server** * Selecteer de server (bijvoorbeeld `DC1.bmc.local`) * Klik op **Next** 5. **Selecteer rollen** * Vink aan: **Web Server (IIS)** * Bevestig de pop-up om vereiste features te installeren * Klik op **Next** 6. **Selecteer extra features** * Selecteer (indien niet al aangevinkt): * `.NET Framework 4.x Features` * **Management Service** (voor remote beheer) * **IP and Domain Restrictions** * **Web Server Security**: * **Request Filtering** * **Basic Authentication** * **Windows Authentication** > πŸ“Œ Let op: als `.NET Framework` problemen geeft, mount de installatie-ISO van Windows Server 2016 en kies installatie vanaf de ISO (`sxs` map). 7. **Klik door tot β€œConfirm” en installeer** * Klik op **Install** * Wacht tot installatie voltooid is * (Herstart indien gevraagd) --- ## βœ… **Stap 2: Test of IIS werkt** 1. Open een browser op een client in het netwerk 2. Ga naar: * `http://dc1.bmc.local` * Je zou de **IIS Default Web Site** moeten zien (β€œWelcome” pagina) --- ## πŸ› οΈ **Stap 3: (Optioneel) Remote Management op Core Server** Als je een Core-server hebt geΓ―nstalleerd met IIS (headless), dan: 1. Log in op de Core Server of via PowerShell Remote 2. Voer het volgende commando uit: powershell Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WebManagement\Server -Name EnableRemoteManagement -Value 1 3. Herstart de IIS management service: powershell net stop wmsvc net start wmsvc 4. Beheer vanaf je DC via **IIS Manager β†’ Connect to a server** --- ## πŸ” **Stap 4: Beveilig de Default Web Site** ### A) IP Restrictie instellen 1. Open **IIS Manager** op DC 2. Klik op **Default Web Site** 3. Dubbelklik op **IP Address and Domain Restrictions** 4. Stel standaard gedrag in: * Rechts in het menu: **Edit Feature Settings** * Selecteer: **Deny access for unspecified clients** β†’ OK 5. Voeg toegestane IP-range toe: * Rechts β†’ **Add Allow Entry** * Specific range: `192.168.2.0` * Subnet mask: `255.255.255.0` β†’ OK 6. Voeg uitzondering toe (weigeren 192.168.2.2): * Rechts β†’ **Add Deny Entry** * Specific IP address: `192.168.2.2` β†’ OK --- ### B) Basic Authentication instellen 1. Ga in IIS Manager naar **Default Web Site** 2. Dubbelklik op **Authentication** 3. Schakel **Basic Authentication** in * Rechterklik β†’ Enable 4. Zet andere authenticatiemethoden uit (zoals Anonymous) 5. Stel realm in: * Rechterklik op **Basic Authentication** β†’ **Edit** * Vul bij Realm: `Basic authentication` β†’ OK 🧠 **Waarom is Basic Authentication minder veilig?** * Wachtwoorden worden in **Base64** verzonden (geen encryptie!) * Alleen veilig over **HTTPS** * Gevoelig voor sniffing/afluisteren op niet-versleutelde netwerken --- ### C) Switch naar Windows Authentication 1. **Disable Basic Authentication** * Rechterklik β†’ Disable 2. **Enable Windows Authentication** * Rechterklik β†’ Enable πŸ” **Test vanuit verschillende clients:** * **Windows client**: Automatisch aanmelden met domeinaccount * **Linux client**: Geen automatische SSO β†’ Mogelijk prompt voor credentials πŸ’‘ **Uitleg verschil:** * Windows gebruikt **Kerberos of NTLM** β†’ naadloze integratie met domein * Linux heeft dit meestal niet ingebouwd β†’ handmatige authenticatie --- ### D) Logging-opties uitbreiden 1. Klik in IIS Manager op **Default Web Site** 2. Dubbelklik op **Logging** 3. Klik rechts op **Select Fields** 4. Vink **alle beschikbare velden aan** zoals: * Client IP * User-Agent * URI Query * Win32 Status * Protocol Version * etc. 5. Klik op **OK** en bevestig --- ## πŸ“¦ Tot slot: Test en valideren * Test toegang **binnen netwerk** (192.168.2.x) * Test of **192.168.2.2** geblokkeerd wordt * Probeer aan te melden en bekijk de logging * Probeer toegang via browser vanaf Windows en Linux * Controleer of authenticatie en IP-filters goed werken ---