Installing SafeSquid on Various Linux Distributions Using SafeSquid's tar file

Installing SafeSquid on Various Linux Distributions Using SafeSquid's tar file

Installation of SafeSquid without SAB using tar file.

SafeSquid is a versatile web filtering software that can be installed on various Linux operating systems, including but not limited to Red-Hat, SuSe, and CentOS. 
This flexibility allows users to deploy SafeSquid on their existing infrastructure or select a Linux distribution that best fits their organizational needs and preferences. 
The installation process on Linux distributions other than Ubuntu involves a few additional steps and configurations to ensure optimal performance and stability.

Key Considerations:

System Compatibility: Before proceeding with the installation, verify that your chosen Linux distribution is compatible with SafeSquid and meets the necessary system requirements, such as CPU, memory, and storage.
Dependency Management: Different Linux distributions might require specific dependencies or libraries for SafeSquid. Ensure that all necessary software prerequisites are installed and updated.
Installation Process: The installation steps may vary slightly depending on the Linux distribution. It typically involves downloading the SafeSquid package tailored for the specific version of Linux and using the distribution's package manager for installation.
Configuring Monit and BIND Services: SafeSquid utilizes Monit for management and monitoring of system processes and BIND for DNS services. Proper configuration of these services is crucial for the effective functioning of SafeSquid.
Security and Firewall Settings: Configure your system's firewall to allow traffic through the ports used by SafeSquid. Also, ensure that your system is secured against potential threats.
Performance Optimization: Depending on your Linux distribution, there might be unique performance tuning options that can enhance the efficiency of SafeSquid.
Regular Maintenance and Updates: Keep SafeSquid and its dependencies updated to ensure security, stability, and access to the latest features.
Documentation and Support: Utilize the official SafeSquid documentation for detailed installation and configuration instructions. Seek support from the SafeSquid community or professional support services if needed.
Backup and Recovery Planning: Implement a strategy for backing up your SafeSquid configuration and system settings to facilitate quick recovery in case of system failure.
This document aims to provide a step-by-step guide to installing SafeSquid on a variety of Linux distributions, highlighting important considerations and best practices to ensure a successful deployment.

Overview

SafeSquid can also be installed on any other Linux operating system like Red-Hat, SuSe, CentOS, etc.
Choose this method of installation only if you want to setup SafeSquid on already existing infrastructure or if you want to use other Operating System in Linux family other than Ubuntu. 
It requires some additional configurations which are Monit and bind services used by SafeSquid.

Prerequisites

You must install required dependencies and other supporting services required for some modules of SafeSquid to work smoothly.
You can check and install required dependencies below.
Monit and Bind are other supporting services required by SafeSquid to work smoothly.
Check - Configure Monit for SafeSquid Monitoring
Check - Bind Configuration with SafeSquid

Download the latest version in Linux server.

Go to the linux server and change the directory to “/usr/local/src” by using below command
  1.  cd /usr/local/src
Use the “wget" command to download the latest SafeSquid package on the Linux machine on which you want to install SafeSquid. The command will download the tarball file.
  1. Wget http://downloads.safesquid.net/appliance/binary/safesquid_latest.tar.gz
Extract the tarball.
Extract the files from tar by using the command below.
  1. tar -xzvf safesquid_latest.tar.gz
The output of the above command is shown below.
extracting the tar.gz file in the directory
All the files will be extracted in the directory having name "_mkappliance".
You must execute/run the setup.sh script to install SafeSquid.
  1. _mkappliance/installation/setup.sh
Output after script execution is shown below.
listing the files with command ls -lrt in the src directory
Installation completes if you did not get any error.
Dependency Check 
You can check if any of the dependencies missing for SafeSquid by using the "ldd" command as shown below.
  1. ldd /opt/safesquid/bin/safesquid
Output for the above command is shown below.
  1. root@safesquid:/opt/safesquid/bin# ldd /opt/safesquid/bin/safesquid
  2.        linux-vdso.so.1 =>  (0x00007ffebebdb000)
  3.        libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007ff03107e000)
  4.        libpam.so.0 => /lib/x86_64-linux-gnu/libpam.so.0 (0x00007ff030e70000)
  5.        liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007ff030c61000)
  6.        libgssapi.so.3 => /usr/lib/x86_64-linux-gnu/libgssapi.so.3 (0x00007ff030a23000)
  7.        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff03081f000)
  8.        libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007ff030604000)
  9.        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff030300000)
  10.        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff02fffa000)
  11.        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff02fde4000)
  12.        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff02fbc6000)
  13.        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff02f7fd000)
  14.        libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007ff02f5e2000)

If any dependency is missing, then you might get error as shown below.
  1. root@safesquid:/opt/safesquid/bin# ldd /opt/safesquid/bin/safesquid
  2.        linux-vdso.so.1 =>  (0x00007ffebebdb000)
  3.        libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007ff03107e000)
  4.        libpam.so.0 => /lib/x86_64-linux-gnu/libpam.so.0 (0x00007ff030e70000)
  5.        liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007ff030c61000)
  6.        libgssapi.so.3 => /usr/lib/x86_64-linux-gnu/libgssapi.so.3 (0x00007ff030a23000)
  7.        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff03081f000)
  8.        libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007ff030604000)
  9.        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff030300000)
  10.        libgmp.so.3==> not found
  11.        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff02fffa000)
  12.        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff02fde4000)
  13.        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff02fbc6000)
  14.        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff02f7fd000)
  15.        libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007ff02f5e2000)

If you notice that any of the dependencies are not present then, you should install that dependencies to make SafeSquid work.
Start the SafeSquid
Further you need to Start the SafeSquid service by using the command below.
  1. /etc/init.d/safesquid start
Testing
You can check whether SafeSquid service is running or not by using these commands.
  1. pidof safesquid   OR         netstat -tulnp | grep "safesquid"
By default, SafeSquid will listen on PORT 8080. If you observe SafeSquid is listening on any one of the ports shown in the image, then its confirm that SafeSquid has started.
Note: This installation does not include the Monit and Bind configurations.

    • Related Articles

    • Install SafeSquid Secure Web Gateway using SafeSquid Appliance Builder

      Problem To set up your Secure Web Gateway appliance, you need to first install the Linux operating system on your provisioned hardware. Next, harden the system by implementing best security practices and partition the disks appropriately. Afterward, ...
    • Setup Your Secure Web Gateway on your preferred Linux distribution

      Overview SafeSquid Appliance Builder (SAB) is an optimized version of Ubuntu Linux, optimized for easy setup of your secure web gateway. The SAB installs the Ubuntu Linux operating system, downloads and deploys the SafeSquid for Linux installation ...
    • Make a Bootable SafeSquid Secure Web Gateway USB device Using balenaEtcher

      Overview A bootable USB drive streamlines the SafeSquid installation process by offering a fast, reliable, and portable alternative to traditional CD/DVD media, overcoming the absence of optical drives in modern computers. Its versatility and speed ...
    • Block Emails or Files including archives or Social Posts using Keywords

      Overview When any employee/user from your network leaked the confidential information intentionally or unintentionally, then what will happen? Huge loss to your organization. In your organization various mediums and modes comes into play for data ...
    • Implementing SafeSquid on Cloud

      Background The SafeSquid proxy server is a native x86_64 Linux network service application. The software is distributed as a “tar-ball”package. It can thus be deployed on an appropriate Linux based host platform. Efficient performance installation ...