Upgrade Ubuntu 20.04 to 24.04 for SafeSquid compatibility
OS upgrade scope and procedure
Use this step-by-step, non-interactive procedure to upgrade the SafeSquid Secure Web Gateway system from Ubuntu 20.04 LTS to Ubuntu 24.04 LTS, then to SafeSquid version 2025.1001.1232.3. The steps ensure compatibility, security, and service continuity for SafeSquid deployments running in production environments.Why This Upgrade Is Required
1. SafeSquid Compatibility Requirements for The latest release:
SafeSquid Secure Web Gateway 2025.1001.1232.3 introduces the following minimum system requirements:- Linux Kernel: 6.8 or higher
- glibc: 2.39 or higher
- Kernel up to 5.15
- glibc 2.31
2. Ubuntu 20.04 End of Life (EoL)
Ubuntu 20.04 LTS reaches End of Standard Support in April 2025. After this date:- No further security patches or OS updates will be provided
- Package repositories may become unavailable
- Vulnerabilities and compatibility issues will accumulate
Important Pre-Requisite
- Login as root
sudo) to execute all commands in this procedure.
Upgrading the operating system and SafeSquid involves modifying system-level files, packages, and services that require root-level access.
To switch to the root user, run:
-
Free Storage in
/root: The/rootpartition must have more than 15 GB of free space to accommodate upgrade files, temporary packages, and extracted data. Check available space:
Note: If free space is below 15 GB, clean up unnecessary files or resize the /root partition before proceeding.
- Check Current OS Version
Step 1: Upgrade Ubuntu from 20.04 → 24.04 (Two-Step Process)
Ubuntu LTS upgrades must be done sequentially (20.04 → 22.04 → 24.04). This ensures all intermediate packages, kernel modules, and libraries are properly migrated.Phase 1 – Upgrade from 20.04 to 22.04
Why:- Ubuntu cannot skip LTS versions directly
- This step ensures that kernel, libc, and dependent packages are incrementally upgraded to versions compatible with 22.04
apt autocleanremoves obsolete package filesapt autoremoveclears unused dependencies to prevent clutterapt-get clean: Removes cached packages to free space and avoid conflictsapt update && apt upgrade -y: Ensures the system is fully patched before upgradingdo-release-upgrade -f DistUpgradeViewNonInteractive: Initiates the upgrade to Ubuntu 22.04 in non-interactive mode, This upgrades Ubuntu to the next LTS version without stopping to ask questions, ensuring a fully automated process suitable for remote servers or critical systems.
Phase 2 – Upgrade from 22.04 to 24.04
Why: This phase upgrades the system to the final target OS, Ubuntu 24.04 LTS, which provides:- Kernel 6.8
- glibc 2.39
- Modern dependencies required by SafeSquid 2025.1001.1232.3
apt autocleanremoves obsolete package filesapt autoremoveclears unused dependencies to prevent clutterapt-get clean: Removes all cached package files from/var/cache/apt/archivesto free up space and prevent conflictsapt update && apt upgrade -y: Updates the package index and upgrades all installed packages to the latest available versions automaticallydo-release-upgrade -f DistUpgradeViewNonInteractive: Initiates the Ubuntu OS upgrade to the next release in a fully automated, non-interactive mode
After the upgrade completes:
apt autocleanremoves obsolete package filesapt autoremoveclears unused dependencies to prevent clutter- Reboot ensures the system loads the new kernel and environment
Step 2: Update BIND Configuration
Why: SafeSquid, during its operation, creates or modifies/etc/bind/named.conf.appliance.options, which automatically add options dnssec-validation and TTL limits.
These options cause conflicts when starting bind9 service.
The reason SafeSquid does this is to ensure Active Directory (AD) integration works smoothly, as these options control DNS validation and caching behavior, which are critical for resolving AD domain controllers and Kerberos services.
Commands:
Step 3: Rename msktutil Binary
Why:msktutil is a tool used for managing machine accounts in Active Directory.
SafeSquid or system processes may attempt to use the existing msktutil binary, which was built for Ubuntu 20.04.
On Ubuntu 24.04, this older binary can have dependency issues with newer Kerberos libraries.
Command:
Step 4: Update Netplan Configuration
Why: During OS upgrades, network settings may change or revert. Updating Netplan ensures the system uses the local DNS resolver (127.0.0.1), allowing proper DNS resolution through your AD-integrated BIND server. Commands:Step 5: Upgrade SafeSquid Application
Why: Once the OS environment is compatible (kernel 6.8, glibc 2.39), install the new SafeSquid version. The latest release provides updated filtering features, enhanced TLS handling, and improved performance. Commands:Step 6: Post-Upgrade Cleanup and Verification
Why: Cleaning residual packages prevents storage bloat and ensures a consistent, stable environment. Verification confirms that both OS and SafeSquid versions are upgraded successfully. Commands:Verify Installed SafeSquid Version.

