<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Odumosu Pamilerin on Medium]]></title>
        <description><![CDATA[Stories by Odumosu Pamilerin on Medium]]></description>
        <link>https://medium.com/@odumosu.opef?source=rss-94f3f16c6859------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*XXeQv9YWSG8emytD</url>
            <title>Stories by Odumosu Pamilerin on Medium</title>
            <link>https://medium.com/@odumosu.opef?source=rss-94f3f16c6859------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 09:53:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@odumosu.opef/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Virtual Private Network in Linux]]></title>
            <link>https://medium.com/@odumosu.opef/virtual-private-network-in-linux-edf41a105ca6?source=rss-94f3f16c6859------2</link>
            <guid isPermaLink="false">https://medium.com/p/edf41a105ca6</guid>
            <category><![CDATA[openvpn]]></category>
            <category><![CDATA[vpn]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[rhcsa]]></category>
            <dc:creator><![CDATA[Odumosu Pamilerin]]></dc:creator>
            <pubDate>Sun, 17 May 2026 18:52:35 GMT</pubDate>
            <atom:updated>2026-05-17T18:52:35.583Z</atom:updated>
            <content:encoded><![CDATA[<p>A <strong>VPN (Virtual Private Network)</strong> is a technology that creates a <strong>secure, encrypted connection (tunnel) over a public network like the internet</strong>, allowing devices to communicate as if they were on a private network. It <strong>routes your internet traffic through a remote server, encrypting your data and hiding your IP address</strong>. This ensures that your online activities remain private and protected from potential threats, such as hackers, surveillance, and data breaches.</p><p>A VPN works by creating a <strong>secure, encrypted tunnel</strong> between your device and a remote server, so your data can travel safely over the public internet.</p><p><strong>Types of VPN</strong></p><ol><li>Remote Access VPN (Client-to-site): Remote Access allows an individual device securely “join” a remote network as if it were physically inside it.</li><li>Site-to-Site VPN: A Site-to-Site VPN connects two entire networks, making them behave like one unified network.</li></ol><h4><strong>VPN Protocols</strong></h4><p>VPN protocols are the <strong>rules and methods used to create the secure tunnel, encrypt data, and authenticate connections</strong> between devices in a VPN.</p><p><strong>Types of VPN protocols</strong></p><p><strong>Internet Protocol Security (IPSec)</strong></p><p>Internet Protocol Security, or IPSec, is used to secure Internet communication across an IP network. IPSec secures Internet Protocol communication by authenticating the session and encrypting each data packet during the connection.</p><p>IPSec operates in two modes: Transport mode and Tunneling mode, to protect data transfer between two different networks. Transport mode encrypts the message in the data packet, and Tunneling mode encrypts the entire data packet.</p><p><strong>Layer 2 Tunneling Protocol (L2TP)</strong></p><p>L2TP, or Layer 2 Tunneling Protocol, is a tunneling protocol that is usually combined with another VPN security protocol like IPSec to create a highly secure VPN connection. L2TP creates a tunnel between two L2TP connection points, and the IPSec protocol encrypts the data and handles secure communication within the tunnel.</p><p><strong>Point-to-Point Tunneling Protocol (PPTP)</strong></p><p>PPTP, or Point-to-Point Tunneling Protocol, creates a tunnel and encapsulates the data packet. It uses Point-to-Point Protocol (PPP) to encrypt the data between the connections.</p><p><strong>Secure Sockets Layer (SSL) and Transport Layer Security (TLS)</strong></p><p>SSL (Secure Sockets Layer) and TLS (Transport Layer Security) create a VPN connection where the web browser acts as the client, and user access is restricted to specific applications instead of the entire network.</p><p><strong>OpenVPN</strong></p><p>OpenVPN is an open-source VPN that is useful for creating Point-to-Point and Site-to-Site connections. It uses a custom security protocol based on SSL and TLS protocols.</p><h3>Installing and Configuring VPN</h3><h4>On the Server</h4><p>I.<strong> System Update</strong> : Begin by updating the package list. Performing this step guarantees the installation of the latest software versions and security updates.</p><p>II.<strong> Install OpenVPN and Easy-RSA</strong></p><p>OpenVPN is the leading software for establishing and handling VPN connections. Meanwhile, Easy-RSA serves as a utility designed to simplify the generation of essential SSL certificates and keys for secure communication.</p><p>Before installing openvpn and easy-rsa, installation of Extra Packages for Enterprise Linux (EPEL) on RHEL10 is required which can be done using</p><p><a href="https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm"><strong><em>sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm</em></strong></a></p><p>sudo dnf install easy-rsa openvpn -y</p><p>III. <strong>Initialize the Easy-RSA PKI</strong></p><p>Once Easy-RSA is installed, you have to initialize the Public Key Infrastructure. This step is necessary to set up the certificate authority and generate the certificates and keys needed for OpenVPN.</p><p>Initially, copy the Easy-RSA configuration directory to an alternate location. This precaution will safeguard your alterations from being overwritten by future package upgrades.</p><p><strong><em>sudo cp -r /usr/share/easy-rsa /etc/</em></strong></p><p><strong><em>cd /etc/easy-rsa/ </em></strong>— navigates to the created directory</p><p><strong><em>sudo ./easyrsa init-pki </em>—</strong> Initializes the Public Key Infrastructure</p><p>IV. <strong>Generate the Certificate Authority</strong></p><p>In this step, you will generate the Certificate Authority certificate and key</p><p><strong><em>sudo ./easyrsa build-ca</em></strong></p><p>You’ll be prompted to enter a password and a common name for the Certificate Authority key for security. The CA key should be kept secure as it signs certificates for your VPN.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XPjolqpfu2Hlmb_vBK9S6g.gif" /></figure><p>V. <strong>Generate Diffie-Hellman parameters</strong></p><p>With Diffie-Hellman keys, you can establish secure connections with strong encryption. However, It is possible to skip this step entirely, but you would leave your VPN setup less secure.</p><p><strong><em>sudo ./easyrsa gen-dh</em></strong></p><p>VI. <strong>Generate OpenVPN server certificate and key</strong></p><p>In this step, you generate the server certificate and key for your OpenVPN server.</p><p>Here, you first have to change the current working directory to the Easy-RSA directory.</p><p><strong><em>cd /etc/easy-rsa</em></strong></p><p><strong><em>sudo ./easyrsa build-server-full server nopass</em></strong></p><p>The nopass flag disables passphrase protection.</p><p>VII. <strong>Generate HMAC key</strong></p><p>The TLS/SSL pre-shared authentication key adds an extra layer of security by including an HMAC signature on every SSL/TLS handshake packet. This measure helps prevent potential DoS attacks and UDP port flooding. Although not mandatory, I strongly advise you to consider this step, particularly if you intend to safeguard against specific attacks.</p><p><strong><em>sudo openvpn — — genkey secret /etc/easy-rsa/pki/ta.key</em></strong></p><p>VIII. <strong>Generate OpenVPN revocation certificate</strong></p><p>Generate a revocation certificate to invalidate previously signed certificates</p><p><strong><em>sudo ./easyrsa gen-crl</em></strong></p><p>IX. <strong>Copy server certificates and keys</strong></p><p>In this step, copy the generated server certificates and keys to the OpenVPN server’s configuration directory. These files are necessary for establishing secure connections between the server and clients.</p><p><strong><em>sudo cp -rp /etc/easy-rsa/pki/{ca.crt,dh.pem,ta.key,crl.pem,issued,private} /etc/openvpn/server/</em></strong></p><p>X. <strong>Generate OpenVPN client certificates and keys</strong></p><p>This step involves creating certificates and keys for each client that will connect to the OpenVPN server. These certificates and keys are unique to each client and are used for authentication</p><p><strong><em>cd /etc/easy-rsa</em></strong></p><p><strong><em>sudo ./easyrsa build-client-full clientname nopass</em></strong></p><p>XI. <strong>Editing OpenVPN server configuration file</strong></p><p>This file contains settings that control how the OpenVPN server operates.</p><p>The included configuration file offers several adjustable parameters that cater to your preferences. These parameters oversee various aspects, like the server’s listening port, tunnel device type, encryption preferences, and more.</p><p><strong><em>sudo vim /etc/openvpn/server/server.conf</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t9vKpsHA4y846RRaWpkizg.gif" /></figure><p>XII. <strong>Enable IP forwarding and Firewall configuration</strong></p><p>Enable IP forwarding in the sysctl configuration. This step allows the server to route traffic between its interfaces. It’s an important step for proper VPN operation.</p><p><strong><em>sudo sed -i ‘s/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/’ /etc/sysctl.conf</em></strong></p><p>Apply the changes without rebooting the server</p><p><strong><em>sudo sysctl — — system</em></strong></p><p><strong>Configure Firewall Rules</strong></p><p>Allow VPN traffic through the firewall</p><p><strong><em>sudo firewall-cmd — add-service=openvpn — permanent</em></strong></p><p><strong><em>sudo firewall-cmd — add-masquerade — permanent</em></strong></p><p><strong><em>sudo firewall-cmd — reload</em></strong></p><p><strong>Start and Enable OpenVPN server</strong></p><p>Start the OpenVPN service and enable it to run at boot:</p><p><strong><em>sudo systemctl start openvpn-server@server</em></strong></p><p><strong><em>sudo systemctl enable openvpn-server@server</em></strong></p><p>Check the service status: <strong><em>sudo systemctl status openvpn-server@server</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e11-mR6kc861i07O132jJQ.gif" /></figure><h4>On the Client</h4><p>I. Install OpenVPN and Easy-RSA</p><p>II. Generate a client certificate and key on the VPN server for the client device</p><p><strong><em>cd ~/openvpn-ca</em></strong></p><p><strong><em>./easyrsa gen-req client1 nopass</em></strong></p><p><strong><em>./easyrsa sign-req client client1</em></strong></p><p><strong>Copy client certificate and key from the server using scp to /etc/opevpn/client</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JlRjGxVpz7IfvBEjiPa1ig.gif" /></figure><p><strong>Create a client configuration</strong> (client1.conf) in the /etc/openvpn/client directory</p><p><strong><em>vim /etc/opevpn/client/client1.conf</em></strong></p><p>In the client1.conf file:</p><pre>client<br>dev tun<br>proto udp<br><br>remote 192.168.159.139 1194<br><br>resolv-retry infinite<br>nobind<br><br>remote-cert-tls server<br><br>ca /etc/openvpn/client/ca.crt<br>cert /etc/openvpn/client/client1.crt<br>key /etc/openvpn/client/client1.key<br><br>tls-auth /etc/openvpn/client/ta.key 1<br><br>auth SHA512<br><br>data-ciphers AES-256-GCM:AES-256-CBC<br>data-ciphers-fallback AES-256-CBC<br><br>verb 3</pre><p><strong>Start and Enable the openvpn client service</strong></p><p><strong><em>sudo systemctl start openvpn-client@client1</em></strong></p><p><strong><em>sudo systemctl status openvpn-client@client1</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6PwK1B-uRjuXyMoJZ0HlzA.gif" /></figure><p><strong>Testing the VPN Client configuration</strong></p><p>ip a shows a tunnel interface (tun 0) created on the client</p><p>ip route shows the network traffic route through the tunnelling interface</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FtaC2KINkv5Gql-vXkQTgw.gif" /></figure><p><strong>Using SSH with Tunnel Interface</strong></p><p>To verify the tunnel port, the private IP address attached to the tunnel can be used for networking activities such as ssh and ping in place of the server physical interface IP address</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3alud8MezdKlVtG_4vKFaQ.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=edf41a105ca6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting permission on file share using principle of least privilege and zero trust]]></title>
            <link>https://medium.com/@odumosu.opef/setting-permission-on-file-share-using-principle-of-least-privilege-and-zero-trust-a1c8850e6f97?source=rss-94f3f16c6859------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1c8850e6f97</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[zero-trust]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[least-privilege-access]]></category>
            <dc:creator><![CDATA[Odumosu Pamilerin]]></dc:creator>
            <pubDate>Mon, 11 May 2026 08:26:12 GMT</pubDate>
            <atom:updated>2026-05-11T08:26:12.403Z</atom:updated>
            <content:encoded><![CDATA[<h4>What is Principle of Least Privilege ?</h4><p>The Princple of Least Privilege is that every user, process, or system should have only the minimum level of access required to perform its task — and nothing more. It focuses on the having just the necessary set of permission to execute a set of tasks.</p><p><strong>Why is Least Privilege Important?</strong></p><ol><li>Minimizes Attack Surface: By reducing the number of users and processes with high-level permissions, you lower the chances of exploitation by malicious actors.</li><li>Reduces Human Error: Employees may unintentionally execute destructive commands or make unauthorized changes when given excessive permissions. Least privilege helps prevent these scenarios.</li><li>Isolates and Limits Damage: When a user or application has restricted access, even if compromised, the potential damage is limited to what the compromised account can do.</li><li>Fulfills Compliance Requirements: Many regulations and standards, including GDPR, HIPAA, and PCI-DSS, emphasize the principle of least privilege as a core tenet of information security.</li></ol><h4><strong>Implementing Least Privilege in Linux Environment</strong></h4><ol><li><strong>User Account Management</strong></li></ol><p>Audit existing User Accounts, remove accounts that are no longer in use and ensure that each active user has role commensurate with their needs.</p><p>Avoid giving full sudo permission to regular users, give command specific access.</p><p>Disable direct root login, only users with sudo privileges should be allowed to use root functions</p><p><strong><em>visudo</em></strong></p><p>Assigns privileges for shutting down, sleep and system configuration for a non-root user</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ajqWTujUd2ja56aPMuhE_Q.gif" /></figure><p>2. <strong>Enforce Proper File Permissions</strong></p><p>Linux Permissions (read, write, and execute) should be set carefully for files and directories, restrict sensitive files to root access</p><p>3. <strong>Use ACLs for Fine-Grained Access</strong></p><p>Grant specific access without fully opening everything</p><p><strong><em>setfacl -m u:alice:rwx /project</em></strong></p><p>4. <strong>Harden Running Services</strong></p><p>5. <strong>Enable SELinux Enforcement</strong></p><p>6. <strong>Configure Security for File Sharing</strong></p><p>7. <strong>Disable unused accounts and remove unnecessary packages/services</strong></p><p>8. <strong>SSH Access Control</strong></p><ul><li>Restrict Login users</li><li>Disable root login</li></ul><p>9. <strong>Secure File Sharing (SMB/NFS)</strong></p><ul><li>Restrict shares to specific users/groups</li><li>Disable guest access</li></ul><p>10. <strong>Audit and Monitor Access</strong></p><p>auditctl -w /etc/sudoers -p wa -k privilege_changes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v-QhyhiY0g3XmdksYXn8xA.gif" /></figure><h4>Principle of Zero Trust</h4><p>The Princple of Zero Trust is built on never trusting any user, process or system but they should always be verified before given access to resources, network, files etc. This involves verifying every request, assuming breach, continuous monitoring.</p><p>This essentially means users, devices, and applications don’t get implicit trust regardless of whether it operates inside or outside the enterprise network.</p><p>Why is Zero Trust important ?</p><ol><li>It stops lateral movement</li><li>It enforces least privilege (consistently)</li><li>It improves visibility and auditing</li></ol><p>4. It shifts trust to identity and context</p><p>Implementing Zero Trust on Linux Systems</p><ol><li><strong>Strong User Authentication</strong></li></ol><ul><li>Multi-Factor Authentication (MFA): User Identities should be protected by MFA. Use tools like Google Authenticator to enhance login security.</li><li>Strong Password Policies: Enforce password policies that require complex, unique passwords that must be periodically changed.</li></ul><p>2. <strong>Use Role-Based Access Control (RBAC)</strong></p><p>Assign roles based on the principle of least privilege, ensuring users only have access to the resources necessary for their tasks. Tools like SELinux and AppArmor can further enforce strict access controls and isolation for different workloads.</p><p>3. <strong>Enable Firewall and Network Segmentation</strong></p><p>4. <strong>Monitor and Log Activities</strong></p><ul><li>Intrusion Detection Systems (IDS): Deploy solutions like OSSEC or Snort to monitor real-time activities and detect anomalies that may indicate intrusions.</li><li>Comprehensive Logging: Ensure that logging for critical services is enabled and monitored. Use tools like Logwatch or ELK (Elasticsearch, Logstash, Kibana) for centralized logging and analysis.</li></ul><p>5. <strong>Employ Containerization and Virtualization</strong></p><p>Isolate workloads using container technologies like Docker or Kubernetes. This adds an additional layer of abstraction and security, allowing you to manage and deploy applications in a controlled manner. Ensure that containers run with the least privileges and avoid using the root account whenever possible.</p><p>6. <strong>Regular Security Audits and Assessments</strong></p><p>Conduct regular audits of your security configuration and policies. Use tools like Lynis or Tiger for security assessments to ensure compliance with best practices and identify potential vulnerabilities.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1c8850e6f97" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[File Tagging and Classification in Linux]]></title>
            <link>https://medium.com/@odumosu.opef/file-tagging-and-classification-in-linux-aad465e4f037?source=rss-94f3f16c6859------2</link>
            <guid isPermaLink="false">https://medium.com/p/aad465e4f037</guid>
            <category><![CDATA[file-tagging]]></category>
            <category><![CDATA[rhcsa-ex200]]></category>
            <category><![CDATA[setfacl]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[system-administration]]></category>
            <dc:creator><![CDATA[Odumosu Pamilerin]]></dc:creator>
            <pubDate>Mon, 11 May 2026 08:23:34 GMT</pubDate>
            <atom:updated>2026-05-11T08:23:34.095Z</atom:updated>
            <content:encoded><![CDATA[<p>File tagging is the process of attaching <strong>metadata (labels or attributes)</strong> to files to describe their content, sensitivity, or purpose.</p><p>These tags can indicate:</p><ul><li>Sensitivity Level</li><li>Ownership</li><li>Data Type</li></ul><p>File Classification is the process of categorizing data based on its senstivity and importance. Data Classification defines what kind of data you have, how sensitive it is and how it should be protected.</p><p><strong>Linux File Attributes</strong></p><p>Every file has associated <strong>metadata</strong> — information that describes the file rather than its contents.</p><p>Core file attributes include:</p><ul><li>Permissions (read, write, execute)</li><li>Ownership (user and group)</li><li>Timestamps (access, modify, change)</li><li>File type (regular file, directory, symlink, etc.)</li></ul><h4>Extended Attributes (xattr)</h4><p><strong>Extended attributes (xattr)</strong> are a feature in Linux that allow you to attach <strong>extra metadata</strong> to files and directories beyond the standard information like permissions, ownership, and timestamps.</p><p>Extended attributes (xattr) allows attaching <strong>custom metadata</strong> to files beyond standard attributes. They are widely used for:</p><ul><li>Security Labeling (e.g. Selinux Contexts)</li><li>File tagging and classification</li><li>Application-specific metadata</li></ul><p>xattr uses a key-value model attached to files and directories.</p><p>Components :</p><ul><li>Namespace: Defines access control and purpose (who can access attributes and how they are used)</li><li>Attribute Name: Identifier of the metadata</li><li>Value: Actual stored data (actual data assigned to the attribute)</li></ul><p>Tools for managing xattr</p><ul><li>getfattr (Get File Attributes): Views extended attributes of a file</li><li>setfattr (Set File Attributes): Adds or Modify extended attributes</li></ul><p><strong>Types of Metadata</strong></p><ol><li>System Metadata (Automatically managed by the Linux kernel). This includes : file permissions, ownership, timestamps, file size and type</li><li>User Metadata</li></ol><p>Custom metadata added by users or applications. This includes: tags, Application-specific data, Extended attributes (xattr).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v9leyCqtI9u9Hj_zEJUhKQ.gif" /></figure><pre>sudo dnf install attr -y<br><br>mkdir -p ~/lab_data/{confidential,internal,public}<br><br>touch ~/lab_data/confidential/finance.txt<br>touch ~/lab_data/internal/system.log<br>touch ~/lab_data/public/info.txt</pre><p>Adds classification lab tag for confidential, internal and public files respectively.</p><p><strong><em>setfattr -n user.classification -v “confidential” ~/lab_data/confidential/finance.txt</em></strong></p><p><strong><em>setfattr -n user.classification -v “internal” ~/lab_data/internal/system.log</em></strong></p><p><strong><em>setfattr -n user.classification -v “public” ~/lab_data/public/info.txt</em></strong></p><p><strong><em>getfattr -d ~/lab_data/confidential/finance.txt</em></strong> — views all extended attributes (metadata) attached to a file</p><p><strong><em>getfattr -R -d ~/lab_data </em></strong>— displays all extended attributes (metadata) for every file inside a directory, recursively.</p><p><strong><em>getfattr -n user.classification ~/lab_data/internal/system.log</em></strong> — display a specific extended attribute (classification) for a file.</p><p><strong><em>setfattr -n user.classification -v “restricted” ~/lab_data/confidential/finance.txt </em></strong>— modifying (updating) the classification metadata of a file.</p><p><strong><em>getfattr -n user.classification ~/lab_data/confidential/finance.txt</em></strong> — check the current classification (metadata) of the file.</p><p><strong><em>setfattr -x user.classification ~/lab_data/public/info.tx</em></strong>t — removes a metadata attribute from a file.</p><p><strong><em>getfattr -d ~/lab_data/public/info.txt</em></strong> — displays all extended attributes (metadata) attached to a file</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aad465e4f037" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux System Hardening]]></title>
            <link>https://medium.com/@odumosu.opef/linux-system-hardening-a7278d9a7cb6?source=rss-94f3f16c6859------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7278d9a7cb6</guid>
            <category><![CDATA[rhcsa]]></category>
            <category><![CDATA[sysadmin]]></category>
            <category><![CDATA[system-hardening]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[logging]]></category>
            <dc:creator><![CDATA[Odumosu Pamilerin]]></dc:creator>
            <pubDate>Sat, 09 May 2026 21:31:04 GMT</pubDate>
            <atom:updated>2026-05-09T21:31:04.853Z</atom:updated>
            <content:encoded><![CDATA[<p>Linux system hardening is the process of <strong>securing a Linux system by reducing its attack surface and minimizing vulnerabilities</strong>. Linux may have a reputation for being secure, but no system is immune to threats — especially when it’s misconfigured, outdated, or exposed to the internet.</p><p>While Linux offers strong security foundations, most distributions aren’t hardened by default — they prioritize usability over strict security. That’s where Linux hardening comes to play the process of tightening system configurations, reducing vulnerabilities, and strengthening defenses to minimize the risk of compromise. In today’s threat landscape, hardening isn’t optional — it’s essential.</p><h4>Areas that require Hardening</h4><ol><li><strong>Physical Security</strong></li></ol><p>Physical security is the first and often most overlooked layer of defense in Linux hardening.</p><p>Without securing access at the hardware level, an attacker with physical access can bypass many operating system defenses.</p><p>To protect against unauthorized local access, consider the following essential steps:</p><p><strong>Set a BIOS/UEFI Password</strong></p><p>Adding a BIOS (or UEFI) password helps prevent unauthorized users from booting the system, changing boot order, or booting from external media like USB drives or live CDs. It’s a simple but effective way to block attackers from bypassing the OS entirely.</p><p><strong>Secure the Boot Loader (GRUB)</strong></p><p>GRUB controls how the operating system is started. Without a password, anyone with access to the console can edit boot parameters and potentially gain root access by booting into single-user mode.</p><p>To protect GRUB:<br>- Set a GRUB password using a hashed value.<br>- This prevents unauthorized editing of boot entries during startup.</p><p>This command generates a secure hashed password you can configure in GRUB’s config file. By locking down physical access points like the BIOS and bootloader, you reduce the chance of an attacker gaining low-level control over your system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FoJEAVDzDIuVHLKyYEv6ww.gif" /></figure><p><strong>2. Firewall</strong></p><p>A firewall is one of the most fundamental security controls for any Linux system. It acts as a gatekeeper, deciding which network traffic is allowed in or out based on defined rules. Without it, your system may expose unnecessary services to the network.</p><p>For firewall security, create a default-deny policy by default allowing only what is explicitly needed. Traffic and Ports that are no longer in use can be disabled after use to eliminate access to old ports. This minimizes the attack surface and follows a principle of least exposure.</p><p>Firewall Tools like iptables, nftables, ufw can be used to manage firewall access.</p><p><strong>3. SSH Hardening</strong></p><p>SSH (Secure Shell) is the most common method for remote access to Linux systems — and one of the most targeted services by attackers.</p><p><strong>Disable Root Login</strong></p><p>Allowing direct login as `root` is risky. If an attacker guesses or cracks the root credentials, they gain full control immediately.<br>Instead:<br>- Require users to log in with their own accounts.</p><p><strong>Enforce Public Key Authentication</strong></p><p>Passwords are vulnerable to brute-force attacks, especially if weak or reused. Public key authentication is significantly more secure and should be enforced in place of password-based logins.</p><p>Generate a key pair locally and copy the public key to the server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C6lcmxySUQn91s7PgE4dSQ.gif" /></figure><p><strong>4. Securing User Accounts</strong></p><p>User accounts are often overlooked in Linux security, but they represent one of the most common entry points for attackers — especially if mismanaged. Proper account hygiene and privilege control are essential to reduce insider risks and prevent lateral movement after a compromise.</p><p><strong>Create a Non-Root Admin Account</strong></p><p>Rather than logging in as `root`, create a regular user and add it to the `sudo` group. This follows the <strong>principle of least privilege</strong> — users only escalate to admin rights when needed, not by default.</p><p><strong>Disable the Root Account</strong></p><p>Once you have a `sudo` user configured, disable the root account entirely to remove a high-value target. This makes brute-force attacks on the `root` user ineffective.</p><p><strong>Enforce a Strong Password Policy</strong></p><p>Weak passwords are low-hanging fruit for attackers. Enforce policies that require:<br>- Minimum password length<br>- Use of uppercase, lowercase, numbers, and symbols<br>- Regular password changes (where appropriate)</p><p>Tools like `pam_pwquality` can help enforce these rules at the system level.</p><p><strong>Disable Unused and Local Service Accounts</strong></p><p>Old or unused user accounts can become backdoors if forgotten. Regularly audit user lists and:<br>- Disable or remove accounts that are no longer needed.<br>- Lock down system and service accounts that don’t require interactive logins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SS0fuS0uhpkQAxRx4TH1Bw.gif" /></figure><p><strong>5. Software and Services</strong></p><p>Every piece of software or running service on a Linux system represents potential risk.</p><p><strong>Disable Unnecessary Services</strong></p><p>Start by reviewing which services are enabled and running. If they’re not required for your system’s purpose, disable them. Every active service increases attack surface and system complexity.</p><p><strong>Avoid Legacy Protocols</strong></p><p>Older protocols (e.g., Telnet, FTP, or older SSL versions) were not designed with modern security threats in mind. Replace them with secure alternatives:<br>- Telnet → SSH<br>- FTP → SFTP or SCP<br>- SSLv2/v3 → TLS 1.2 or newer</p><p><strong>6. Update and Upgrade Policies</strong></p><p>Even a well-configured system can be vulnerable if it’s running outdated software. New vulnerabilities are discovered constantly, and attackers often exploit known issues long after patches are released.</p><p><strong>Maintain Automatic Updates</strong></p><p>While manual updates offer control, automated security updates ensure essential patches are applied promptly, even if no one is actively managing the system. Configure your system to:<br>- Automatically install security updates<br>- Notify admins of available patches<br>- Log update activity for auditing</p><p><strong>Audit and Log Configuration</strong></p><p>Even the most secure systems can’t prevent every possible breach — but they can detect and respond. Proper logging and auditing give you visibility into what’s happening on your system, so you can identify suspicious activity, investigate incidents, and maintain accountability.</p><p><strong>Keep Track of Log Files</strong></p><p>Your system generates logs for nearly every significant action — user logins, service behavior, system changes, and more. These logs are your first line of defense for spotting anomalies.<br>Focus on key log files:<br>- `/var/log/auth.log` — Login attempts and authentication events<br>- `/var/log/syslog` or `/var/log/messages` — General system messages<br>- `/var/log/apt/` — Package update and installation history</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ONuBLv3hutJlbqsycixrDA.gif" /></figure><p>Ensure logs are:<br>- <strong>Collected regularly</strong><br>- <strong>Rotated</strong> to prevent disk overuse (via `logrotate`)<br>- <strong>Protected</strong> from unauthorized access or tampering</p><p><strong>Set Up Auditing Tools</strong></p><p>For more detailed monitoring, Linux offers auditing frameworks like `auditd` that can track specific system calls, file access, and user actions. While more advanced, these tools provide deeper insight for compliance or forensic analysis.</p><p>Without proper logs and auditing, even the best security measures can be blind. Monitoring isn’t just for after something goes wrong — it’s how you ensure things are going right.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7278d9a7cb6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ansible Playbooks]]></title>
            <link>https://medium.com/@odumosu.opef/ansible-playbooks-7151ac6d87a2?source=rss-94f3f16c6859------2</link>
            <guid isPermaLink="false">https://medium.com/p/7151ac6d87a2</guid>
            <category><![CDATA[ansible-playbook]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[ansible]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[rhcsa]]></category>
            <dc:creator><![CDATA[Odumosu Pamilerin]]></dc:creator>
            <pubDate>Fri, 08 May 2026 13:13:13 GMT</pubDate>
            <atom:updated>2026-05-08T13:13:13.177Z</atom:updated>
            <content:encoded><![CDATA[<p>An <strong>Ansible playbook</strong> is a YAML file that defines a set of tasks to be executed on managed nodes in a structured, repeatable, and automated way.</p><p>YAML is human readable, structured and easy to write making it suitable for ansible automation playbooks</p><p>A playbook = a step-by-step automation script written in YAML that tells Ansible what to do, where to do it, and how to do it.</p><p>Compared to Ad-hoc commands, playbooks can handle reusable multiple complex tasks easily without need for running commands</p><p>Components of Ansible Playbooks</p><p>i. Play: A play is the top level unit in the playbook, defining which hosts to target and the tasks to run</p><p>ii. Host: specifies target systems from the inventory</p><p>iii. Tasks: List of actions to be executed on managed nodes</p><h4>Working with Ansible</h4><p><strong>Section I: User and Group Management</strong></p><p>The playbook creates users and group across managed nodes and adds users to assigned groups looping through variables</p><pre> name: Create users and groups, assign users to group<br>  hosts: servers<br>  become: yes<br><br>  vars:<br>    group_name: DevOps<br><br>    users:<br>      - alice<br>      - bob<br>      - charles<br><br>    group_members:<br>      - alice<br>      - charles<br>    tasks:<br><br>    - name: Create users<br>      user:<br>        name: &quot;{{ username }}&quot;<br>        state: present<br>        create_home: yes<br>        shell: /bin/bash<br>      loop: &quot;{{ users }}&quot;<br>      loop_control:<br>        loop_var: username<br><br>    - name: Create group<br>      group:<br>        name: &quot;{{ group_name }}&quot;<br>        state: present<br><br>    - name: Add selected users to group<br>      user:<br>        name: &quot;{{ member }}&quot;<br>        groups: &quot;{{ group_name }}&quot;<br>        append: yes<br>       loop: &quot;{{ group_members }}&quot;<br>      loop_control:<br>        loop_var: member<br><br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S7aOnqkL7xvrlrmmxwecWA.gif" /></figure><p><strong>Section II: Backup for Control node to Managed node</strong></p><p>This playbook automates the process of:</p><ul><li>creating a compressed archive of the /etc directory on the control node</li><li>transferring that backup to all managed nodes</li></ul><p>The variable used indicates the source of the file, the destination of the file and the name of the backup archive respectively</p><pre> name: Backup control node and distribute to managed nodes<br>  hosts: servers<br>  become: yes<br><br>  vars:<br>    backup_src: /etc        # what to back up on control node<br>    backup_dest: /tmp/backups<br>    backup_file: etc_backup.tar.gz<br><br>  tasks:<br><br>    - name: Create backup using tar<br>      command: tar -czf /tmp/{{ backup_file}} {{ backup_src }}<br>      delegate_to: localhost<br>      run_once: true<br><br>    - name: Ensure backup directory exists on managed nodes<br>      file:<br>        path: &quot;{{ backup_dest }}&quot;<br>        state: directory<br>        mode: &#39;0755&#39;<br><br>    - name: Copy backup to managed nodes<br>      copy:<br>        src: &quot;/tmp/{{ backup_file }}&quot;<br>        dest: &quot;{{ backup_dest }}/{{ backup_file }}&quot;<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iqPuAxJWuxBmwEyQkH5gcg.gif" /></figure><p><strong>Section III: Installing Applications</strong></p><p>This playbook automates the process of:</p><ul><li>Installing software packages (<strong>Git</strong> and <strong>Tree</strong>) on RHEL systems</li><li>Verifying successful installation of each package</li><li>Displaying installed versions for confirmation</li></ul><pre>- name: Install Git on RHEL systems<br>  hosts: servers<br>  become: yes<br>  tasks:<br>    - name: Install Git package<br>      package:<br>        name: git<br>        state: present<br>    - name: Verify Git Installation<br>      command: git --version<br>      register: git_version<br><br>- name: Install Tree on RHEL systems<br>  hosts: servers<br>  become: yes<br>  tasks:<br>    - name: Install Tree package<br>      package:<br>          name: tree<br>          state: present<br>    - name: Verify Tree Installation<br>      command: tree --version<br>      command: which tree<br>      register: tree_version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GaYJ4SHrwu1EvUgH4s_dcA.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7151ac6d87a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ansible]]></title>
            <link>https://medium.com/@odumosu.opef/ansible-3d461d3f7af7?source=rss-94f3f16c6859------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d461d3f7af7</guid>
            <category><![CDATA[iac]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[ansible]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[redhat-linux]]></category>
            <dc:creator><![CDATA[Odumosu Pamilerin]]></dc:creator>
            <pubDate>Mon, 27 Apr 2026 14:53:21 GMT</pubDate>
            <atom:updated>2026-04-27T14:53:21.965Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What is Ansible?</strong></p><p><strong>Ansible</strong> is an automation tool that helps you manage, configure, and deploy across systems, without needing to manually to log into each server allowing repetitive tasks to be performed simultaneously.</p><p>Ansible can be regarded as a lightweight and agentless software that using SSH for Linux systems which means it doesn’t require additional software for the machine you want to manage.</p><h4>Why is Ansible useful ?</h4><p>The traditional approach would be to log into each machine one by one, run the installation commands, configure settings, and verify everything works. This could take hours or even days, and there’s always a chance of human error.</p><p>Ansible solves this problem efficiently. You write your instructions once, and Ansible executes them across all 50 machines in minutes. Here are some features that makes Ansible useful:</p><p><strong>Time Saving</strong>: Automate repetitive tasks and focus on more important work. What took hours now takes minutes.</p><p><strong>Simplicity</strong>: Ansible uses YAML, a human-readable language that looks almost like plain English. You don’t need to be a programming expert to use it.</p><p><strong>Consistency</strong>: When Ansible runs your tasks, it does exactly the same thing on every machine. No more “but it worked on my machine” problems.</p><h4>Practical Use Cases of Ansible</h4><p><strong>Configuration Management: </strong>Ansible can ensure all servers maintain the correct configuration. If someone accidentally changes a setting, Ansible can detect and fix it during the next run.</p><p><strong>Application Deployment: </strong>Deploying a new version of your application involves multiple steps: stopping services, backing up data, updating code, running database migrations, and restarting services.</p><p><strong>Security and Compliance: </strong>Ensuring all servers meet security standards is critical. Ansible can automatically apply security patches, configure firewalls, manage user accounts, and generate compliance reports.</p><p><strong>Disaster Recovery: </strong>In case of failures, Ansible can quickly rebuild servers to their exact specifications, restoring services much faster than manual processes.</p><h4>Components of Ansible</h4><ol><li><strong>Ansible Playbooks</strong></li></ol><p>An Ansible playbook is a file that contains a set of instructions describing how systems should be configured or what tasks should be executed. A playbook can be described as a “recipe” Ansible follows to automate your work. It’s written in YAML format and contains a series of plays and tasks.</p><p>2. <strong>Ansible Inventory</strong></p><p>An inventory is a collection of target machines, organized in a way that Ansible can understand and use. It is the file or source that defines the list of systems (servers) that Ansible will manage.</p><p>3. <strong>Ansible Modules</strong></p><p>Ansible modules are the individual tools Ansible uses to do actual work on systems. There are thousands of built-in modules for managing files, packages, services, cloud resources, databases, and more, each module is designed for a specific purpose.</p><p>4. <strong>Ansible Roles</strong></p><p>An Ansible role is a structured way of organizing playbooks, tasks, and configurations into reusable, modular components.</p><h4><strong>How Ansible Works ?</strong></h4><p>Ansible works on a Control Node (a machine where Ansible is installed and from which all automation tasks are executed) to configure one or more Managed nodes (a machine that is controlled and configured by the control node using Ansible) communicating via SSH</p><p><strong>Working with Ansible</strong></p><p>a. Installing Ansible</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VlB-lXkA3AhoJdEfiIexHg.gif" /></figure><p>b. Connecting the control node to the managed node for remote access</p><p>Ensure the sshd service is running in all the devices use systemctl status sshd</p><p>Insert the IP Address and hostname in /etc/hosts for easier resolution</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4oVotWLmh7FQp2crmwijbA.png" /></figure><p>Generate a public key for the server to remotely connect to the clients</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3SR-KTG3wcyL45YDjsQYgA.gif" /></figure><p>c. An Inventory file is created for storing the IP address of the managed nodes, simplifing the remote management.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*idInhz1q0X2zPe-r3zlhIg.gif" /></figure><p>A ping test is carried out to verify connectivity between the control node and managed nodes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y9tVuWon3CIvu5u-l3iKjA.gif" /></figure><p><strong><em>ansible servers -i inventory.ini -m ping</em></strong> — tests ssh connectivity to the server group in the inventory file</p><p><strong><em>ansible servers -i inventory.ini -m command -a “free -h”</em></strong> — Runs a memory check command on all servers defined in the inventory group</p><h4>Ad-hoc Commands and Ansible Modules</h4><p><strong>Ad-hoc commands</strong> in Ansible are <strong>one-line commands used to perform quick tasks on remote servers without writing a playbook</strong>.</p><p>Ad-hoc are used with Ansible Modules to extend their functionality</p><p>Ad-hoc command performs various tasks for the control nodes to be excuted on the managed nodes</p><p>i. Package installation using dnf module</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V9jcjqG7IeZqlMkWWBKIqA.gif" /></figure><p><strong><em>ansible servers -i inventory.ini -m dnf -b -a “name=chronyd state=latest” — — ask-become-pass</em></strong> — Installs and updates vsftpd package on all servers using sudo privileges</p><p><strong><em>ansible server -i inventory.ini -m command -a “systemctl status chronyd” -b — — ask-become-pass</em></strong> — checks the status of chronyd service on the remote systems</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uif3ShaOWqrBcXCRefSlCw.gif" /></figure><p><strong><em>ansible 192.168.159.129 -i inventory.ini -m shell -a “ss -tunlp”</em></strong> — checks open ports on a specific server</p><p><strong><em>ansible 192.168.159.129 -i inventory.ini -m user -a “name=remoteusers state=present” -b — — ask-become-pass</em></strong> — creates and enables a new user on a specific server</p><p><strong><em>ansible servers -i inventory.ini -m shell -a “df -h | grep /dev” </em></strong>— Runs a disk usage check on all servers and filter only actual disk devices</p><p><strong><em>ansible servers -i inventory.ini -m command -a “uptime” </em></strong>— shows the system uptime of all the servers in the inventory</p><p>Ad-hoc commands are useful in remote system monitoring and management making them efficient but they limited to executing a single task at a time which is where Ansible playbooks comes to use as playbooks can run a collection of tasks sequentially.</p><p>Ansible playbooks will be looked at in the next section.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d461d3f7af7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Container Orchestration with Kubernetes]]></title>
            <link>https://medium.com/@odumosu.opef/container-orchestration-with-kubernetes-ed87c1a9b8d1?source=rss-94f3f16c6859------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed87c1a9b8d1</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[rhcsa]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Odumosu Pamilerin]]></dc:creator>
            <pubDate>Mon, 27 Apr 2026 14:27:37 GMT</pubDate>
            <atom:updated>2026-04-27T14:27:37.567Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction to Kubernetes</strong></p><p>Kubernetes is an open-source platform used to <strong>automate the deployment, scaling, and management of containerized applications</strong>. It automates the deployment, scaling, and management of containerized applications across clusters of machines. This is a system that automatically manages containers at scale.</p><p>Importance of Kubernetes in Containers</p><ol><li>Automation of Operations</li><li>High Availability and Reliability</li><li>Efficient Resource Utilization</li><li>Load Balancing and Service Discovery</li></ol><p>Kubernetes is important in relation to Docker as it builds on Docker containers to automatically deploy, scale, manage, and recover applications across multiple machines, ensuring that containerized applications run reliably, efficiently, and at large scale in production environments without manual control.</p><h4>Kubernetes Architecture</h4><p><strong>Kubernetes</strong> uses a <strong>cluster-based architecture</strong> designed to manage containerized applications efficiently.</p><p>A Kubernetes cluster is divided into two main parts:</p><ol><li><strong>Control Plane Components</strong>: The Control Plane consists of several key components that work together to manage the cluster</li></ol><p>a. API Server: The API Server is the central communication hub of Kubernetes. API Server is responsible for recieving all requests and validating those requests</p><p>b. Scheduler: The Scheduler decides where to run containers (Pods) and watches for new Pods that need replacement.</p><p>c. Controller Manager: The Controller Manager ensures the System stays in the desired state by monitoring the clusters continuously.</p><p>d. etcd: etcd is a distributed key-value database that stores all cluster data configuration and settings, keeping data consistent and reliable</p><p>2.<strong> Worker Node Components</strong></p><p>Worker nodes are the machines where actual application runs, receives instructions from Control Plane and executes them.</p><p>a. Kubelet: The kubelet is an agent that runs on every worker node. Kubelet communicates with the Control Plane (via API Server) and receives instructions about which Pods should run.</p><p>b. Kube-proxy: The kube-proxy is a networking component on each node. Kube-proxy enables communication between Pods and Services, maintaining network rules on the node.</p><p>c. Container Runtime: The container runtime is a software that actually runs the containers.</p><h4>Installing and Configuring Kubernetes</h4><p>Configuration of Kubernetes requires 2 RedHat Systems (one Control node and one Worker node)</p><p>Control Node: 192.168.159.128</p><p>Worker Node: 192.168.159.129</p><p><strong>A. Initial Configuration</strong></p><ol><li><strong>Update the Control and Worker node</strong> and reboot the system if there are any kernel updates.</li></ol><pre>dnf update -y<br>reboot</pre><p>2. <strong>Configure Hostnames and Hostfiles (/etc/hosts)</strong> set up your hostnames for the control plane as well as the worker node properly.</p><p>Edit /etc/hosts on both nodes and add entries for both machines so that we can reach our machine via its hostname with would make it easier.</p><pre>hostnamectl set-hostname k8s-control #on the control node<br>sudo hostnamectl set-hostname k8s-worker #on the worker node<br>#edit /etc/hosts<br>192.168.159.128 k8s-control<br>192.168.159.129 k8s-worker</pre><p>3. <strong>Disable Swap:</strong> Kubernetes doesn’t utilize swap and for kubernetes to work effectively swap needs to be disabled in /etc/fstab</p><pre>swapoff -a<br>#edit swap partition entry in /etc/fstab and comment them out<br>vim /etc/fstab</pre><p>4. <strong>Configure Selinux</strong>: Selinux is needed to be in permissive mode for test cluster.</p><pre>setenforce 0<br>#change the enforcing mode to permissive mode<br>vim /etc/selinux/config<br>SELinux=Enforcing to SELinux=Permissive<br></pre><p>5. <strong>Load Kernel Modules:</strong> Kubernetes needs specific kernel modules for networking. Load them to make sure they load on boot.</p><pre>vim /etc/modules-load.d/k8s.conf<br>overlay<br>br_netfilter<br><br>modprobe overlay<br>modprobe br_netfilter<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uaDOm9xD2RqUCAosUrb3xA.gif" /></figure><p>6. <strong>Configuring Kernel Parameters:</strong> Set up some sysctl parameters that Kubernetes requires for networking. This enables IP forwarding and bridge traffic for pod networking</p><pre>vim /etc/sysctl.d/k8s.conf<br>net.bridge.bridge-nf-call-iptables = 1<br>net.bridge.bridge-nf-call-ip6tables = 1<br>net.ipv4.ip_forward = 1<br><br>sysctl --system</pre><p>7.<strong> Configuring Firewall Rules:</strong> Open up the ports needed by Kubernetes</p><p><strong><em>On the Control node</em></strong></p><pre>sudo firewall-cmd --permanent --add-port=6443/tcp<br>sudo firewall-cmd --permanent --add-port=2379-2380/tcp<br>sudo firewall-cmd --permanent --add-port=10250-10252/tcp<br>sudo firewall-cmd --reload</pre><p>Port 6443 is for the Kubernetes API server, 2379–2380 are for etcd, and 10250 is for the kubelet. The 30000–32767 range is for NodePort services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VPkg3U3_0reg4XVMNXhvRg.gif" /></figure><p><strong><em>On the Worker Node</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S7HALAY-qvflbljqd7z3pw.gif" /></figure><h4><strong>Installing Container Runtime (CRI-O)</strong></h4><p>A <strong>container runtime</strong> is the component in Kubernetes that actually <strong>runs applications inside containers</strong>. Without it, Kubernetes would only <em>schedule</em> workloads but nothing would execute.</p><p>Container Runtime is responsible for running applications, handle container images, managing lifecycles and control resource usage.</p><p>By default, Container Runtime are not in the default RHEL repos so it requires to be added to the repository first in <em>/etc/yum.repos.d/</em> . The installation should be done on the control and worker node.</p><pre>vim /etc/yum.repos.d/cri-o.repo<br>[cri-o]<br>name=CRI-O<br>baseurl=https://download.opensuse.org/repositories/isv:/cri-o:/stable:/$CRIO_VERSION/rpm/<br>enabled=1<br>gpgcheck=1<br>gpgkey=https://download.opensuse.org/repositories/isv:/cri-o:/stable:/$CRIO_VERSION/rpm/repodata/repomd.xml.key<br>EOF<br><br>sudo dnf install -y cri-o<br>systemctl enable --now cri-o</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*whQ4PWOIzFk31DIEhDgEwg.gif" /></figure><p><strong><em>Installing Kubernetes Components</em></strong></p><p>Kubeadm, Kubelet, Kubectl are essential Kubernetes tools used to initialize a Kubernetes container, runs every node and ensures containers are running as expected and interact with the Kubernetes cluster respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LMO21LdiGOMm7HXoUPIxSg.gif" /></figure><pre>#vim /etc/yum.repos.d/kubernetes.repo<br>KUBERNETES_VERSION=v1.34<br>[kubernetes]<br>name=Kubernetes<br>baseurl=https://pkgs.k8s.io/core:/stable:/$KUBERNETES_VERSION/rpm/<br>enabled=1<br>gpgcheck=1<br>gpgkey=https://pkgs.k8s.io/core:/stable:/$KUBERNETES_VERSION/rpm/repodata/repomd.xml.key<br>exclude=kubelet kubeadm kubectl cri-tools kubernetes-cni<br><br>sudo dnf install -y kubelet kubeadm kubectl<br></pre><p><strong>Installing Container Network Interface (CNI)</strong></p><p>Pods needs to talk to each other across nodes which require a CNI plugin which is made possible by CNI plugin</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rW0EB7kdl84-Rfp43gMcnA.gif" /></figure><pre>kubectl apply -f https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml<br>kubectl get pods -n kube-flannel</pre><p><strong>Join the Worker Node</strong></p><p>On the control node, generate the join command for the worker node from the control node.</p><pre>kubeadm token create --print-join-command<br>#use the join command in the worker node<br>kubeadm join 192.168.159.131:6443 --token oh4kbo.zqlda6v3gf7cly7n --discovery-token-ca-cert-hash sha256:dac3960d42ca9fcce2255f02c0e428cd61b55d9affd6fa3d82e02041c4b1515d <br>kubectl get nodes</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OVWt7src4rL-TD3fzzuAdg.gif" /></figure><p><strong>Deploy and Testing a Sample Application</strong></p><pre>#create a yaml file for app deployment<br>vim nginx-deployment.yaml<br>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: nginx-deployment<br>spec:<br>  replicas: 3<br>  selector:<br>    matchLabels:<br>      app: nginx<br>  template:<br>    metadata:<br>      labels:<br>        app: nginx<br>    spec:<br>      containers:<br>      - name: nginx<br>        image: nginx:latest<br>        ports:<br>        - containerPort: 80</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5PLZp1_NNvEyHrVsWsfJ8Q.gif" /></figure><pre>kubectl apply -f nginx-deployment.yaml #applies the deployment<br>kubectl get pods -w #shows status of the pods<br>kubectl expose deployment nginx-deployment --type=NodePort --port=80<br>#creates a service to expose the deployment<br>kubectl get svc nginx-deployment #checks what port is assigned<br>kubectl get pods -o wide #checks which nodes the pods are running on</pre><h4>Deploying Custom Images with Docker and Orchestration with Kubernetes</h4><p>Prerequisite:</p><p><strong>Initial Installation and Configuration of Docker and Kubernetes services</strong></p><p>A Docker account is required to push custom apps to accessible by Kubernetes</p><pre>mkdir /myapp<br>cd /myapp<br>vim index.html<br>vim Dockerfile<br>docker build -t pamxyz/myapp:latest . #builds custom image locally<br>docker run -d -p 8080:80 pamxyz/myapp:latest #runs and exposes app on port 8080<br>docker push  pamxyz/myapp:latest <br>#pushes image to Docker Hub (ensure to login before pushing images)<br>kubectl create deployment myapp --image=pamxyz/myapp:latest<br>#creates deployment<br>kubectl get pods -o wide #checks pods, nodes and pod ip address<br>kubectl expose deployment myapp --type=NodePort --port=80<br>#creates a service to access the app externally<br>kubectl get svc #checks service status<br>kubectl get pods #checks pods status<br><br></pre><pre>#in index.html<br>&lt;h1&gt; Hello from Kubernetes &lt;/h1&gt;<br>&lt;p&gt;This app is running inside a container &lt;/p&gt;<br>#in Dockerfile<br>FROM nginx:latest<br>COPY index.html /usr/share/nginx/html/index.html</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sYfg7s7np75Bc_jJNAyKxw.gif" /></figure><p>Kubernetes makes it easier to deploy, scale, and maintain applications without constant manual effort. This makes it a valuable tool for system administrators and DevOps teams working with modern, container-based environments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed87c1a9b8d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Containerization (Docker) in Linux]]></title>
            <link>https://medium.com/@odumosu.opef/containerization-docker-in-linux-42376f28833f?source=rss-94f3f16c6859------2</link>
            <guid isPermaLink="false">https://medium.com/p/42376f28833f</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[sysadmin]]></category>
            <dc:creator><![CDATA[Odumosu Pamilerin]]></dc:creator>
            <pubDate>Sun, 19 Apr 2026 20:41:07 GMT</pubDate>
            <atom:updated>2026-04-19T20:41:07.106Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction into Containerization</strong></p><p>In the early days of computing, deploying an application was a very straightforward but inefficient process. Organizations would purchase a physical server, install an operating system, and run a single application on it. This approach, known as <strong>traditional or bare-metal deployment</strong>, worked initially but quickly became problematic.</p><p>To solve this inefficiency, the concept of <strong>virtualization</strong> emerged in the mid-2000s. With virtualization, a single physical server could host multiple virtual machines (VMs), each running its own operating system and application. This significantly improved hardware utilization and provided better isolation between applications.</p><p>As technology advanced and the demand for faster and more scalable deployments increased, a new approach called <strong>containerization</strong> was introduced. Unlike virtual machines, containers do not include a full operating system. Instead, they package only the application and its dependencies while sharing the host system’s kernel. This makes containers lightweight, fast to start, and highly portable. Developers could build an application once and run it consistently across different environments without compatibility issues.</p><h3>What is Containerization?</h3><p><strong>Containerization</strong> is a method of deploying applications where the application and all its dependencies (libraries, runtime, configuration) are packaged together into a <strong>container</strong> so it can run consistently on any system.</p><p>Benefits of Containers in Modern Infrastructure</p><ol><li>Portability: Containers package everything the application needs</li><li>Lightweight &amp; Efficient: Containers share the host OS kernel instead of running a full OS thereby using less CPU and memory</li><li>Fast Deployment &amp; Startup</li><li>Isolation: Each container runs independently without affecting others</li><li>Easy Scability: Containers can be started, stopped, duplicated very quickly making it ideal for handling.</li><li>Simplified Application Management: Applications are broken into smaller units (microservices) making it eaiser to update, debug, maintain</li></ol><h4><strong>Overview of Docker</strong></h4><p>Docker is a platform that enables developers and system administrators to <strong>build, package, and run applications in containers</strong>. It simplifies application deployment by ensuring consistency across different environments.</p><p>Docker allows you to package an application and its dependencies into a container and run it anywhere.</p><p><strong>Docker Components</strong></p><p><strong>Docker Client</strong>: The Docker Client is the tool to interact with Docker. Docker acts as the user interface to send commands to the docker daemon.</p><p><strong>Docker Daemon (dockerd)</strong> is the core engine that runs in the background to build, run container and manage container images.</p><p><strong>Docker API</strong> is the communication layer between Docker Client and Docker Daemon for allowing automation and integration.</p><p><strong>Docker Registry</strong> is the storage system for Docker images which could be a public registry or private registry.</p><p><strong>Installing Docker on RedHat</strong></p><p>Installing Docker on Red Hat requires adding the official repository and installing the engine packages. Docker is provided by <strong>Docker</strong> and runs containers based on OS-level virtualization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z9wmdoeSq6R0E5K_Wu5q2Q.gif" /></figure><p><strong>Working with Services on Docker</strong></p><p>a. Installing required tools</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K8tnJmheeG7RH4DU_s8ElQ.gif" /></figure><pre>sudo dnf install -y dnf-plugins-core #installs extra package features<br>sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo<br>#adds docker official repository to the system<br>sudo dnf install -y docker-ce docker-ce-cli containerd.io <br>#downloads packages from the Docker repo and dependencies automatically<br>sudo systemctl start docker #starts docker service immediately<br>sudo systemctl enable docker #Configures Docker to start automatically when system boots<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8nnlw_wPW6m9Ubf0__fNOQ.gif" /></figure><pre>sudo usermod -aG docker rhcsa #adds a user to the docker group<br>sudo docker run -d --name nginx -p 8080:80 nginx:latest<br>#runs a container using the docker image<br>sudo docker ps #shows currently running containers<br>sudo docker ps -a #shows all containers<br>sudo docker images #shows all container images stored locally <br>sudo docker image inspect nginx <br>#displays detailed internal information about the image<br></pre><p><strong>Configuring Secure Nginx site running on Docker</strong></p><p>In this demo, secure nginx web server was configured to run on dockers containerized environment. Configuring NGINX to run securely within a Docker environment involves a structured process that ensures proper service deployment, secure communication, and maintainable architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*84Em0HUjbqw1fBDGE7LJtw.gif" /></figure><pre>mkdir -p ~/nginx/{html,certs,config} <br>cd ~/nginx<br>echo &quot;Secure Nginx server on Docker&quot; &gt; /html/index.html #creates index file<br>openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /certs/nginx.key<br>-out /certs/nginx.crt #generates ssl certificate<br>vim config/default.conf<br><br>docker run -d \<br>--name nginx-https \<br>-p 80:80 <br>-p 443:443<br>-v ~/nginx-https/html:/usr/share/nginx/html \<br>-v ~/nginx-https/config:/etc/nginx/conf.d \<br>-v ~/nginx-https/certs:/etc/nginx/certs \<br>nginx #volume mounts and port mapping <br></pre><pre>#in the vim /nginx/config/default.conf<br>server {<br>    listen 80;<br>    server_name localhost;<br><br>    # Redirect HTTP → HTTPS<br>    return 301 https://$host$request_uri;<br>}<br><br>server {<br>    listen 443 ssl;<br>    server_name localhost;<br><br>    ssl_certificate /etc/nginx/certs/nginx.crt;<br>    ssl_certificate_key /etc/nginx/certs/nginx.key;<br><br>    location / {<br>        root /usr/share/nginx/html;<br>        index index.html;<br>    }<br> }</pre><p>However, some lightweight docker images such as nginx do not include full system utilities such as ps, systemctl, top and in some cases, even shell environment such as bash are not available</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42376f28833f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Network Filesystem System Setup]]></title>
            <link>https://medium.com/@odumosu.opef/network-filesystem-system-setup-43ebcd3ee939?source=rss-94f3f16c6859------2</link>
            <guid isPermaLink="false">https://medium.com/p/43ebcd3ee939</guid>
            <category><![CDATA[smb]]></category>
            <category><![CDATA[network-file-system]]></category>
            <category><![CDATA[rhcsa]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Odumosu Pamilerin]]></dc:creator>
            <pubDate>Sat, 18 Apr 2026 21:19:13 GMT</pubDate>
            <atom:updated>2026-04-18T21:19:13.363Z</atom:updated>
            <content:encoded><![CDATA[<p>A <strong>Network File System (NFS)</strong> allows multiple computers on a network to <strong>share files and directories over the network as if they were stored locally</strong>. This makes it possible for systems to access the same data from a centralized location. In Linux environments, NFS is widely used to <strong>share storage between servers, workstations, and virtual machines</strong>.</p><p>The main purpose of a Network File System is to <strong>provide shared access to files across multiple systems</strong> within a network.</p><p>Centralized storage using NFS offers several advantages:</p><ol><li>Easier Data Management: Files are stored in one central location, making it easier to maintain, update, and manage data.</li><li>Simplified Backups: Administrators can back up a single storage server instead of backing up multiple machines.</li><li>Improved Collaboration: Multiple users or systems can access the same files simultaneously, which supports team collaboration.</li><li>Consistent Data Access: All clients access the same version of files, reducing duplication and inconsistency.</li></ol><p>The commonly used network sharing technologies are:</p><ol><li>Network File System (NFS)</li><li>Server Message Block (SMB)</li></ol><p>Network file system technologies allow systems on a network to <strong>share files and directories remotely</strong>. These technologies enable users and applications to <strong>access files stored on another computer as if they were stored locally</strong>.</p><p><strong>Server Message Block (SMB)</strong> is a network file-sharing protocol widely used in <strong>Windows environments</strong>. The <strong>Common Internet File System (CIFS)</strong> is an earlier implementation of SMB.</p><p>In Linux systems, SMB file sharing is usually implemented using <strong>Samba</strong>, which allows Linux servers to share files with Windows machines.</p><h4>Network File System Server and Client</h4><p>The <strong>Network File System (NFS)</strong> architecture follows a <strong>client–server model</strong>, where one system acts as the <strong>NFS server</strong> providing shared directories, while other systems act as <strong>clients</strong> that access those shared resources over the network.</p><h4>NFS Server</h4><p>The <strong>NFS server</strong> is responsible for <strong>hosting and exporting directories</strong> that other systems can access. The directory configured by the server is often residing in <strong><em>/etc/exports</em></strong></p><p>Responsibilities of the server include:</p><ul><li>Sharing directories through configuration files</li><li>Managing access permissions</li><li>Handling client requests for file operations</li><li>Maintaining file consistency across clients</li></ul><p>NFS Client</p><p>The NFS client is the system that mounts the shared directory from the NFS server. Once mounted, the remote directory behaves like a local filesystem.</p><h4>Configuring an NFS Server in Linux</h4><p>I. Installing NFS Server Packages</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y1Wx5GvKSVnGmTuSOpD2nw.gif" /></figure><pre>dnf install nfs-utils -y #installs the network file sharing service<br>systemctl enable --now nfs #enables nfs service to run on the system while booting<br>firewall-cmd --add-service nfs --permanent #persistently adds nfs service to the firewall<br>mkdir -p /srv/nfs/shared #creates a shared directory on the server to store shared files<br>chmod 755 /srv/nfs/shared #assigns required permission to the shared files<br></pre><p><strong>Configuring /etc/exports</strong></p><p><strong><em>/etc/exports</em></strong> is the <strong>main configuration file</strong> for nfs services, the file defines <strong>which directories are shared and which clients are allowed to access them</strong>. <strong><em>/etc/exports</em></strong> allows file sharing</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*NAEgDUmSPKFG4WRf1kYLsQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sw8aPxUBXnh26D5T7BgqhQ.gif" /></figure><pre>exportfs -v #displays all exported NFS shares and their options currently active on the server<br>exportfs -r #reads the file and updates active NFS exports</pre><p><strong>Configuring NFS Client</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DMqwoB5Wi3DAJMp0t-w-wA.gif" /></figure><pre>dnf install nfs-utils -y #installs the network file sharing service<br>systemctl enable --now nfs-utils.service #enables nfs service to run on the system while booting<br>firewall-cmd --add-service nfs --permanent #persistently adds nfs service to the firewall<br>mount 192.168.159.128:/srv/nfs/shared /srv<br>#mounts the nfs server&#39;s ip address and shared directory to the clients local directory<br>mount | grep nfs #shows all existing nfs mount on the client system<br>df -h #shows the properties of the network mount</pre><p><strong>Persistent mount on /etc/fstab</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UnJ-aqVMLHf-5-qWPXT7TA.png" /></figure><h4>Introduction to SMB</h4><p><strong>Server Message Block (SMB)</strong> is a <strong>network file-sharing protocol</strong> that allows computers to <strong>share files, directories, printers, and other resources over a network</strong>.</p><p>It is primarily used in <strong>Windows environments</strong>, but it is also implemented on Linux/Unix systems using <strong>Samba</strong>.</p><p>In simple terms:</p><ul><li>A <strong>server</strong> shares a resource (files, printers, etc.)</li><li>A <strong>client</strong> connects to the server</li><li>The client <strong>reads, writes, or modifies files remotely</strong></li></ul><p>SMB operates using a <strong>client–server architecture</strong>.</p><p><strong>Basic communication flow</strong></p><ol><li>Client connects to the server.</li><li>Client authenticates with username/password.</li><li>Client requests access to shared resources</li><li>Server grants access based on permissions.</li></ol><p>5. Client reads or writes files over the network.</p><p>On Linux systems, SMB functionality is provided by <strong>Samba</strong>. Samba allows Linux server to share directories with Windows machines, act as a file server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DWgjQeOlMM5EqueJjpr1ZQ.gif" /></figure><pre>dnf install samba samba-client samba-common -y <br>#samba - installs the samba server service<br>#samba-client - provides client utilities for accessing SMB shares<br>#samba-common - provides common configuration files and libraries<br></pre><p><strong><em>systemctl enable — — now smb : </em></strong>enables smb service to run on the system at boot</p><p><strong><em>mkdir -p /srv/samba/share</em></strong> : creates a smb shared directory</p><p><strong><em>chmod 755 /srv/samba/share : </em></strong>assigns permissions to directory</p><p><strong><em>firewall-cmd — add-service=smb — permanent : </em></strong>allows smb service through the firewall</p><p><strong>Editing /etc/samba/smb.conf</strong></p><pre>[shared]<br>   path = /srv/samba/shared<br>   browseable = yes<br>   writable = yes<br>   read only = no<br>   guest ok = yes</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*hbASmubwNjl0WFh1i5w2jg.png" /></figure><p><strong>Configuring SMB client for linux</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OJRgjGJeGu7mc4JQkjZ-Pw.gif" /></figure><p>smbclient -L //192.168.159.128 — logins in smbclient to shared directories</p><p>Configuring SMB Server for windows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uiUMDwocugzGtEqo2vVWfw.gif" /></figure><pre>smbpasswd -a john #adds the user to the Samba database<br>smbpasswd -e john #enables the user account<br>pdbedit -L #verifies samba users</pre><p>Configuring SMB Windows Client</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e_UoC6OiiNyLCjLhQfKkSg.gif" /></figure><p>ping the server’s IP address to ensure network discovery</p><p>Enable Network Discovery</p><p>Steps:</p><ol><li>Open <strong>Control Panel</strong></li><li>Go to <strong>Network and Sharing Center</strong></li></ol><p>3. Click <strong>Change advanced sharing settings</strong></p><p>4. Enable:</p><ul><li>Turn on network discovery</li><li>Turn on automatic setup of network-connected devices</li></ul><p>Ensure SMB Client Feature is Enabled</p><p>Windows must have the SMB client installed.</p><p>Steps:</p><ol><li>Open Control Panel</li><li>Go to Programs</li><li>Click Turn Windows features on or off</li></ol><p>Verify that:</p><ul><li>SMB Direct</li><li>File Sharing Support</li></ul><p>Access the Samba Share on file explorer using</p><p>\\192.168.159.128\SharedFiles</p><p>Windows would prompt for credentials use the initally created credentials enabled by the server.</p><p><strong>Secure SMB configuration</strong></p><p>It is cruical to ensure the SMB protocol version used by the client and server support encrypted form for file sharing.</p><p>To check the SMB on the linux server : <strong><em>smbd — — version</em></strong> : shows the currently installed version on the linux server, for the windows client <strong><em>Get-SmbConnection</em></strong> shows the server IP as well as the SMB version</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5mkxBu8p2xEfQdDZw4EpDA.gif" /></figure><h4><strong>File Monitoring for SMB</strong></h4><p><strong>auditd</strong> is one of the most powerful built-in tools on Linux for <strong>file monitoring</strong>, especially when you care about <em>security, accountability, and traceability</em> rather than just “something changed.” auditd is a monitoring tool that identify who performed the action, timestamp every event and track the source of activity.</p><p>By default, audtid is installed on systems and is be required to enabled for it to run smoothly using systemctl enable — — now auditd</p><p><strong><em>systemctl status auditd</em></strong> to verify the service is running</p><p>Check Current Rules: <strong><em>sudo auditctl -l</em></strong> shows no rules on a fresh setup</p><p>Add Watch Rule on the Samba Share: <strong><em>sudo auditctl -w /srv/samba/share -p rwxa -k samba_watch</em></strong>; watches read, write, execute and attribute changes on the <em>/srv/samba/share</em> directory tagged to <em>samba_watch</em> for easier searching through the logs</p><p>Make the Rule Persistent by creating an audit rule file: <strong><em>sudo vim /etc/audit/rules.d/samba.rules</em></strong> and add the rule to the file</p><p>Reload the rules using <strong><em>augenrules — — load</em></strong> and verify the rules still exists</p><p>Simulate Activity from the Windows 10 client</p><p>Watch the Audit log as changes occur within the directory with <strong><em>sudo tail -f /var/log/audit/audit.log | grep -i samba_watch</em></strong></p><p>Query the Audit Log using <strong><em>sudo ausearch -k samba_watch</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gngphSZZi42E-oti-8Ctqw.gif" /></figure><p><strong>Network File System</strong> and <strong>Samba</strong> are important file-sharing technologies in Linux environments. NFS is mainly used for efficient file sharing between Linux systems, while Samba uses the <strong>Server Message Block</strong> to enable file sharing between Linux and <strong>Microsoft Windows</strong> systems. Together, they allow administrators to support both Linux-only and mixed operating system networks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43ebcd3ee939" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Deployment in Linux]]></title>
            <link>https://medium.com/@odumosu.opef/web-deployment-in-linux-8442e1a3c76f?source=rss-94f3f16c6859------2</link>
            <guid isPermaLink="false">https://medium.com/p/8442e1a3c76f</guid>
            <category><![CDATA[website]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[apache]]></category>
            <category><![CDATA[https]]></category>
            <category><![CDATA[nginx]]></category>
            <dc:creator><![CDATA[Odumosu Pamilerin]]></dc:creator>
            <pubDate>Wed, 01 Apr 2026 22:56:28 GMT</pubDate>
            <atom:updated>2026-04-01T22:56:28.940Z</atom:updated>
            <content:encoded><![CDATA[<p>A <strong>web server</strong> is software that delivers web content such as HTML pages, images, and applications to users over a network using the <strong>Hypertext Transfer Protocol</strong> or <strong>HTTPS</strong>. Web servers listen for client requests from web browsers and respond by sending the requested resources from the server.</p><p>Primarily, web server are used to:</p><ul><li>Hosting websites and web applications</li><li>Processing client requests and delivering web pages</li><li>Managing connections between clients and server resources</li><li>Serving static and dynamic content over the web</li><li>Providing secure access to web services</li></ul><p>Web Servers are widely used for web hosting (website and web apps), API services and file distribution over http.</p><p>Common Types of Web Servers</p><p>a. <strong>Apache Web Server</strong></p><p>The <strong>Apache HTTP Server</strong> is one of the most widely used open-source web servers for hosting websites and web applications. It runs on many operating systems but is especially popular in Linux environments due to its stability, flexibility, and large community support.</p><p>Features of Apache Web Server</p><ul><li>Open-source and free</li><li>Highly configurable using modules</li><li>Supports Hypertext Transfer Protocol and HTTPS</li><li>Handles static and dynamic web content</li><li>Supports authentication, logging, and security modules</li><li>Can act as a reverse proxy or load balancer</li></ul><p>Installing Apache Web Service</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BdJSI70u8uJzSA1l.gif" /></figure><p>Apache Configuration Structure: Apache Configuration files are stored in <strong><em>/etc/httpd/</em></strong></p><p>Important Files and Directories for Apache include:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/0*VOg_3yneuZmPRZNI.png" /></figure><p>Apache uses directories and blocks to define server behaviour</p><p>Example Configuration:</p><pre>&lt;VirtualHost *:80&gt; #Defines a specific website configuration<br>ServerName example.com #Domain name associated with the site<br>DocumentRoot /var/www/html #Directory containing wwebsite files<br>&lt;/VirtualHost&gt; #HTML closing tag</pre><p><strong>NGINX Web Server</strong></p><p><strong>Nginx </strong>is a high-performance, open-source web server widely used for hosting websites and web applications. It is designed to handle large numbers of concurrent connections efficiently, making it popular in modern cloud and production environments. NGINX supports both Hypertext Transfer Protocol and HTTPS for delivering web content to users.</p><p>Features of Nginx Web server</p><ul><li>High performance and low memory usage</li><li>Handles thousands of concurrent connections</li><li>Built-in <strong>reverse proxy and load balancing</strong></li><li>Efficient <strong>static file serving</strong></li><li>Supports caching and security features</li><li>Event-driven architecture for scalability</li></ul><p>Installing Nginx Server</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*i1r5fuWUMsHrhuOU.gif" /></figure><p>Nginx Configuration Structure: Nginx configuration files are typically located in <strong><em>/etc/nginx</em></strong></p><p>Important files and directories include:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/0*AvnyYBg774eVCjjN.png" /></figure><p>Nginx configuration is organized using <strong>blocks and directives</strong>.</p><p>Example Configuration:</p><pre>server {         #defines a virtual server configuration<br>    listen 80;    #port number the server listens on<br>    server_name example.com;  #domain name for the server<br>    root /usr/share/nginx/html;  #directory where website files are stored<br>}</pre><p><strong>Creating a Basic Website</strong></p><p>Creating a basic website on a Linux server involves preparing a <strong>document root</strong> (the directory where website files are stored) and deploying a simple webpage.</p><p>Setting up Document Root: Document Root is the directory where website files are stored.</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZWpB_TnHznWgOCV-.gif" /></figure><pre>chmod -R 755 /var/www/mywebsite <br>vim /var/www/mywebsite/index.html #creates a document root<br>(optional) the document root can be changed to that of the created test file<br>http://192.168.159.128 #shows the webpage on the browser</pre><h3>Virtual Hosts</h3><p>Virtual hosting allows a single server running <strong>Apache HTTP Server</strong> to host <strong>multiple websites using one IP address</strong>. Apache achieves this using <strong>Virtual Hosts</strong>, which route requests to different website directories based on the domain name requested through the <strong>Hypertext Transfer Protocol</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XkjzzSOOvnD4Js-L.gif" /></figure><pre>mkdir -p /var/www/{site1,site2} #creates 2 web files for web hosting<br>chmod -R 755 /var/www/{site1,site2} #assigns permissions sites to be hosting<br>vim /etc/httpd/conf.d/vhosts.conf #creates virtual host configuration<br>vim /var/www/site1/index.html #creates a webpage for site1<br>vim /var/www/site2/index.html #creates a webpage for site2<br>vim /etc/hosts #configures local hosting<br>vim /etc/httpd/conf.d/vhosts.conf <br>#creates custom configuration file for the virtual hosts<br></pre><h3>Enabling Secure Connection (HTTPS)</h3><p>Secure web access allows users to safely access a website over the internet or a network using <strong>HTTPS</strong>, which encrypts communication using <strong>Transport Layer Security</strong>. This protects data from interception and ensures secure communication with web servers such as <strong>Apache HTTP Server.</strong></p><p>The purpose of using HTTPS rather than basic HTTP is that the content is encrypted while it’s in transit. This means that if somebody captures the traffic between your system and the webserver, they won’t be able to see what was being sent. If you were accessing a basic HTTP server, they could see the content.</p><h4>CONFIGURING SECURE WEB ACCESS (HTTPS)</h4><p>STEP 1 : Installing the Web server (Apache) and SSL modules for encryption</p><pre>dnf install httpd mod_ssl -y<br>systemctl enable --now httpd #ensures service automatically starts at boot<br>firewall-cmd --add-service=https --permanent #opens firewall ports<br>firewall-cmd --reload</pre><p>STEP 2: Create Private Key and Certificate</p><pre>openssl genrsa -out /etc/pki/tls/private/server.key 2048 <br>#creates a new private key for the secure web server using RSA encryption algorithm<br>openssl req -new -x509 -key /etc/pki/tls/private/server.key -out /etc/pki/tls/certs/server.crt -days 365<br>#creates a self signed certificate <br>Common Name (CN) must match ServerIP or Domain Name</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Vr9c_vX8Gm94Sdg6.gif" /></figure><p>STEP 3: Configuring Apache for HTTPS</p><pre>/etc/httpd/conf.d/ssl.conf #contains https configuration<br>edit <br>SSLCertificateFile #add newly created certificate<br>SSLCertificateKeyFile #adds newly created key</pre><p>STEP 4: Copy the certificate into the servers trusted certificate authority (internal CA)</p><pre>cp /etc/pki/tls/certs/server.crt /etc/pki/ca-trust/source/anchors<br>#copies certificate into local certificate authority<br>update-ca-trust #updates local trust authority database<br>curl https://site1.local #tests secure access within the shell environment</pre><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*am-NEXM3NUEjfpB7.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AyMeslEwT5EJLPc5rJuu9g.gif" /></figure><p>Configuration of a web servers using <strong>Apache HTTP Server</strong> or <strong>NGINX</strong> provides the foundation for hosting and managing web content efficiently. By incorporating <strong>HTTPS</strong> with <strong>Transport Layer Security</strong>, the server ensures secure communication through encryption and authentication.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8442e1a3c76f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>