<?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 medamondonga  on Medium]]></title>
        <description><![CDATA[Stories by medamondonga  on Medium]]></description>
        <link>https://medium.com/@medamondonga4?source=rss-612d2f5198b2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hCl7dRlFIZN78SMkIDBaEQ.png</url>
            <title>Stories by medamondonga  on Medium</title>
            <link>https://medium.com/@medamondonga4?source=rss-612d2f5198b2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 11:52:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@medamondonga4/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[Python is not installed in the n8n environment anymore. Here’s why!]]></title>
            <link>https://medium.com/@medamondonga4/python-is-not-installed-in-the-n8n-environment-anymore-heres-why-1f8482ade938?source=rss-612d2f5198b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f8482ade938</guid>
            <category><![CDATA[configuration]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[n8n]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[medamondonga ]]></dc:creator>
            <pubDate>Fri, 13 Mar 2026 12:33:36 GMT</pubDate>
            <atom:updated>2026-03-13T12:43:31.334Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V0ON02k3G0sM9CwqvZ1ARw.png" /></figure><p>I recently ran into an issue in n8n that looked simple at first, but turned out to reveal something much bigger.</p><p>I tried to use Python inside a Code node, and n8n told me that Python was not installed in the environment. At that moment, I thought I was dealing with a basic setup mistake.</p><p>Maybe I forgot a package. Maybe I missed something in Docker. Maybe the container just needed one more dependency. But after reading the documentation more carefully, I realized the problem was not really “Python is missing.” The real problem was that I was still thinking about n8n the old way.</p><p>What confused me is probably what confuses a lot of people: when we self-host n8n with Docker, we naturally assume that if the main n8n container is up, then everything should happen there.</p><p>So if Python is needed, we expect to install or configure it around that main service and move on. But newer versions of n8n no longer treat Python execution like that.</p><p>Code nodes now rely on <strong>task runners</strong>, which means the workflow engine and the place where your Python code actually runs are not necessarily the same thing anymore. Once I understood that, the error suddenly stopped being mysterious.</p><p>The message saying Python was not installed was not just complaining about a missing interpreter somewhere. It was pointing to the fact that my execution model was incomplete. I had n8n, but I had not yet fully prepared the environment that newer n8n versions expect for native Python execution. In other words, I was still using an old mental model on a newer architecture.</p><p>That explains why I ended up having to configure more than I expected. At first, I found it a bit annoying. Why should I need a Dockerfile.n8n, a Dockerfile.runners, a docker-compose.yml, and a .env file just to make Python work inside a workflow tool? It felt heavier than it should be. But once I understood what each part was doing, it actually started to feel less like unnecessary complexity and more like a cleaner separation of responsibilities.</p><p>The Dockerfile.n8n is for the main n8n application. It handles the app itself, the UI, and workflow orchestration. But that does not mean it is the place where Python Code nodes actually run.</p><p>The Dockerfile.runners is where things became clear for me. This is the environment that matters for Python execution. It is the place where the Python runtime, libraries, and execution context need to exist.</p><p>And I think this new model has a real advantage: it gives you much better control over Python. You know where Python lives. You know where packages should be installed. You know which container is responsible for execution. It feels much more solid than a vague built-in Python feature.</p><p>The docker-compose.yml file ties the whole setup together. It connects n8n and the runners, makes sure they can communicate, and turns separate containers into one working system.</p><p>The .env file keeps the configuration clean. Instead of hardcoding values everywhere, it centralizes the variables that control runner behavior and communication between services.</p><p>At first, this architecture feels heavier. But in return, it gives you native Python, better dependency management, clearer execution flow, and a setup that feels more production-ready.</p><h3>How I fixed it</h3><p>Here I will show you how I installed <strong>n8n</strong> to avoid running into this problem again. I will also mention the machine I used for the setup.</p><p>I am not pasting the full code here because every setup can be slightly different depending on the environment. Instead, I will show the file structure and list the files that needed to be configured, along with their purpose.</p><p>For this installation, I used <strong>n8n self-hosted on an Ubuntu Server 24.04</strong> machine. Of course, you must already have <strong>Docker</strong> and <strong>Docker Compose</strong> installed on the server.</p><p>Below is the file structure and the configuration files required for this setup:</p><pre>.env<br>docker-compose.yml<br>Dockerfile.n8n<br>Dockerfile.runners<br>postgres-data/</pre><h3>Dockerfile.n8n</h3><p>This file is for customizing the main n8n application container.</p><pre>FROM docker.n8n.io/n8nio/n8n:1.121.0<br><br>USER root<br><br>RUN apk add --no-cache \<br>    python3 \<br>    py3-pip \<br>    bash \<br>    curl \<br>    jq</pre><h3>Dockerfile.runners</h3><p>This file is for preparing the runner environment where Python code actually executes.</p><pre>FROM n8nio/runners:1.121.0<br><br>USER root<br><br>RUN cd /opt/runners/task-runner-python &amp;&amp; \<br>    uv pip install requests pandas numpy<br><br>USER runner</pre><h3>docker-compose.yml</h3><p>This file is for connecting n8n and the runners so the whole setup works as one system.</p><pre>services:<br>  postgres:<br>    image: postgres:16-alpine<br>    container_name: n8n-postgres<br>    restart: unless-stopped<br>    environment:<br>      POSTGRES_DB: ${POSTGRES_DB}<br>      POSTGRES_USER: ${POSTGRES_USER}<br>      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}<br>    volumes:<br>      - ./postgres-data:/var/lib/postgresql/data<br><br>  n8n:<br>    build:<br>      context: .<br>      dockerfile: Dockerfile.n8n<br>    container_name: n8n<br>    restart: unless-stopped<br>    ports:<br>      - &quot;5678:5678&quot;<br>      - &quot;5679:5679&quot;<br>    depends_on:<br>      - postgres<br>    environment:<br>      DB_TYPE: postgresdb<br>      DB_POSTGRESDB_HOST: postgres<br>      DB_POSTGRESDB_PORT: 5432<br>      DB_POSTGRESDB_DATABASE: ${POSTGRES_DB}<br>      DB_POSTGRESDB_USER: ${POSTGRES_USER}<br>      DB_POSTGRESDB_PASSWORD: ${POSTGRES_PASSWORD}<br><br>      N8N_HOST: 0.0.0.0<br>      N8N_PROTOCOL: http<br>      N8N_PORT: 5678<br>      N8N_EDITOR_BASE_URL: http://your_ip_address:5678<br>      WEBHOOK_URL: http://your_ip_address:5678/<br>      N8N_SECURE_COOKIE: &quot;false&quot;<br><br>      N8N_ENCRYPTION_KEY: ${N8N_ENCRYPTION_KEY}<br>      GENERIC_TIMEZONE: ${GENERIC_TIMEZONE}<br>      TZ: ${TZ}<br><br>      N8N_RUNNERS_ENABLED: &quot;true&quot;<br>      N8N_RUNNERS_MODE: external<br>      N8N_RUNNERS_AUTH_TOKEN: ${N8N_RUNNERS_AUTH_TOKEN}<br>      N8N_RUNNERS_BROKER_LISTEN_ADDRESS: 0.0.0.0<br>      N8N_RUNNERS_BROKER_PORT: 5679<br><br>      NODES_EXCLUDE: &quot;[]&quot;<br><br>    volumes:<br>      - n8n_data:/home/node/.n8n<br><br>  runners:<br>    build:<br>      context: .<br>      dockerfile: Dockerfile.runners<br>    container_name: n8n-runners<br>    restart: unless-stopped<br>    depends_on:<br>      - n8n<br>    environment:<br>      N8N_RUNNERS_TASK_BROKER_URI: http://n8n:5679<br>      N8N_RUNNERS_AUTH_TOKEN: ${N8N_RUNNERS_AUTH_TOKEN}<br>      GENERIC_TIMEZONE: ${GENERIC_TIMEZONE}<br><br>volumes:<br>  n8n_data:</pre><h3>.env</h3><p>This file is for centralizing the variables used for runner behavior and service communication.</p><pre>POSTGRES_DB=n8n<br>POSTGRES_USER=n8n<br>POSTGRES_PASSWORD=0000<br><br>N8N_HOST=0.0.0.0<br>N8N_PROTOCOL=http<br>N8N_PORT=5678<br>N8N_EDITOR_BASE_URL=http://your_ip_address:5678<br>N8N_SECURE_COOKIE=false<br><br>WEBHOOK_URL=http://your_ip_address:5678<br>N8N_ENCRYPTION_KEY=change_me<br><br># Task runners<br>N8N_RUNNERS_ENABLED=true<br>N8N_RUNNERS_MODE=external<br>N8N_RUNNERS_AUTH_TOKEN=change_me<br>N8N_RUNNERS_BROKER_LISTEN_ADDRESS=0.0.0.0<br>N8N_RUNNERS_BROKER_PORT=5679<br><br><br>NODES_EXCLUDE=[]<br><br># Python Code node<br>N8N_RUNNERS_STDLIB_ALLOW=*<br>N8N_RUNNERS_EXTERNAL_ALLOW=requests,pandas,numpy</pre><p>Now you can build it and go find your n8n on <em>http://your_ip_address:5678.</em></p><pre>docker compose up -d --build</pre><p>It work for me maybe it would work for you, if the problem continu please try to search more on the official documentation <a href="https://docs.n8n.io/">https://docs.n8n.io/</a>.</p><p>Bye!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f8482ade938" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Built a Simple and Interactive Sales Performance Dashboard with Power BI]]></title>
            <link>https://medium.com/@medamondonga4/how-i-built-a-simple-and-interactive-sales-performance-dashboard-with-power-bi-41e2457f7d97?source=rss-612d2f5198b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/41e2457f7d97</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[kpi-dashboard]]></category>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[dashboard]]></category>
            <dc:creator><![CDATA[medamondonga ]]></dc:creator>
            <pubDate>Thu, 04 Dec 2025 20:17:33 GMT</pubDate>
            <atom:updated>2025-12-04T20:39:50.128Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ndUDOJTlo-HiW045dOnjbQ.png" /></figure><p>For this project, I had to create a dashboard that shows a company’s commercial performance in real time.</p><p>I started with the basics: understanding the dataset. I spent some time exploring the columns, checking what information was actually useful, and identifying the metrics that really help with decision-making.</p><p>From there, I pulled out the key numbers: <strong>total sales</strong>, <strong>total profit</strong>, and <strong>shipping costs</strong>. These are the first things anyone wants to see, so I made sure they were easy to find and easy to read.</p><p>Once the main KPIs were set, I tried to show the story behind the numbers. I added visuals to break down profit by category, shipping mode, and region. I also included a simple timeline to show how profits evolved year after year.</p><p>My goal wasn’t to make something complicated. I wanted something clear, clean, and that actually helps people understand what’s going on.</p><p>To finish, I added slicers so users can filter the dashboard however they want. Everything is designed to stay simple, interactive, and useful.</p><p>This project helped me practice how to transform raw data into something that people can read and understand in just a few seconds.</p><p>You can see the dataset i used and all files of this projetct on my <a href="https://github.com/medamondonga/12-data-analyst-projects">GitHub</a>.</p><p>Bye!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41e2457f7d97" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Built a Local Load Balancing Environment With Nginx, VirtualBox, and MariaDB]]></title>
            <link>https://medium.com/@medamondonga4/how-i-built-a-local-load-balancing-environment-with-nginx-virtualbox-and-mariadb-125faade8c15?source=rss-612d2f5198b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/125faade8c15</guid>
            <category><![CDATA[elastic-load-balancer]]></category>
            <category><![CDATA[load-balancing]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[mariadb]]></category>
            <category><![CDATA[virtualbox]]></category>
            <dc:creator><![CDATA[medamondonga ]]></dc:creator>
            <pubDate>Thu, 20 Nov 2025 22:57:27 GMT</pubDate>
            <atom:updated>2025-11-20T23:00:28.230Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*W_1MXJi7z8Fuv7dtWSEdqQ.png" /></figure><p>I recently heard about load balancing and wanted to really understand how it works, especially before learning Elastic Load Balancing on AWS. So I decided to build my own small load-balanced environment on my laptop using VirtualBox, Nginx, and a simple Flask application.<br> It turned out to be a great learning experience, and in this article, I’ll walk you through everything I did.</p><h3>1. The Architecture I Wanted to Build</h3><p>I created <strong>four virtual machines</strong>:</p><ul><li>Server 1 &amp; Server 2: hosts for my Flask application</li><li>Serverdb: database server running MariaDB</li><li>MyUbuntu: reverse proxy with Nginx doing load balancing</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*3TDrf2PbRnldNFydUyD_PQ.png" /></figure><h3>2. Setting Up Networking in VirtualBox</h3><p>I put all my VMs on the same private network using VirtualBox.<br> Each VM had:</p><ul><li>its main NAT interface</li><li>a second private interface (like enp0s8), which I configured manually</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OPzfO-SG-mddpbhxHHhSbw.png" /></figure><p>Since I was using an older version of Debian, I had to manually add the private IP to the network configuration file.</p><p>After configuring the interfaces, I tested connectivity using ping.<br> When each VM could ping the others successfully, I knew the network setup was correct.</p><h3>3. Installing and Configuring MariaDB</h3><p>On <strong>Serverdb</strong>, I installed MariaDB:</p><pre>sudo apt install mariadb-server<br>sudo systemctl enable mariadb<br>sudo systemctl start mariadb</pre><p>Then I created a database user and password for my Flask application.</p><p>My Flask project already had the private IP of Server 3 inside the database connection URL, so my app servers would be able to connect directly to the database.</p><h3>4. Deploying My Flask Application</h3><p>My application code was stored on GitHub.<br> When I tried to clone it normally, I had some issues with HTTPS so I switched to <strong>SSH authentication</strong>.</p><p>I generated an SSH key inside the VM:</p><pre>ssh-keygen -t ed25519</pre><p>Then I copied the public key to GitHub.</p><p>After that, cloning worked perfectly.</p><h3>Automating the App Launch Across Multiple Ports</h3><p>I didn’t want to configure and launch the Flask app manually on each server and each port.<br> So I wrote a small Bash script where I could simply do:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*RUhWfwotxd7CxSW6mokJ7w.png" /></figure><p>The script launched my application automatically on all the ports I passed as arguments.<br>This made deployment much easier, especially when testing multiple VMs.</p><h3>5. Setting Up Nginx as a Load Balancer</h3><p>On <strong>Server 4</strong>, I installed and configured Nginx.</p><p>I created a new file with my upstream configuration:</p><pre>upstream app {<br>    server 192.168.56.101:5004;<br>    server 192.168.56.101:5005;<br>    server 192.168.56.101:5006;<br>    server 192.168.56.101:5007;<br>    server 192.168.56.102:5004;<br>    server 192.168.56.102:5005;<br>    server 192.168.56.102:5006;<br>    server 192.168.56.102:5007;<br>}<br><br>server {<br>    listen 80;<br>    server_name _;<br>    <br>    location / {<br>        proxy_pass http://app;<br>        proxy_set_header Host $host;<br>        proxy_set_header X-Real-IP $remote_addr;<br>        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>        proxy_set_header X-Forwarded-Proto $scheme;<br>    }<br>}<br></pre><p>Then I created a server block that passed all traffic to this upstream group.</p><p>Finally, I included this new file inside nginx.conf so Nginx could use it:</p><pre>{##<br>    # Virtual Host Configs<br>    ##<br><br>    include /etc/nginx/conf.d/*.conf;<br>    include /etc/nginx/sites-enabled/*;<br>}</pre><p>I restarted Nginx, and the load balancing started working:<br> Traffic from the client was distributed between my two application servers.</p><h3>6. Testing Everything End-to-End</h3><p>Each Flask app, running on different VMs and ports, could successfully connect to the MariaDB server using the private network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2flVDFPFbihuFdWuV_ujmw.png" /></figure><p>And Nginx was able to redirect incoming requests to Server 1 and Server 2 in a round-robin fashion.<br> Seeing it work gave me a concrete understanding of load balancing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AV2drce1wx0J78ZbmeQdqQ.png" /></figure><h3>7. Why This Project Helped Me Learn</h3><p>I built this project because I wanted to go beyond theory.<br> By configuring everything manually networking, database, SSH, systemd, ports, and Nginx I learned:</p><ul><li>what a load balancer actually does</li><li>how backend servers interact with each other</li><li>how applications share the same database</li><li>how to automate repetitive tasks with Bash</li><li>and how all of this translates to concepts like AWS Elastic Load Balancing</li></ul><p>Now, when I study AWS ELB, I have a much clearer mental model because I’ve seen it work at a lower level.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=125faade8c15" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[8 Real-World Sysadmin Challenges I Solved With Bash Automation(Scripts Included)]]></title>
            <link>https://medium.com/@medamondonga4/8-real-world-sysadmin-challenges-i-solved-with-bash-automation-scripts-included-721867ba3306?source=rss-612d2f5198b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/721867ba3306</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[bash-scripting]]></category>
            <category><![CDATA[server-monitoring]]></category>
            <category><![CDATA[system-administration]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[medamondonga ]]></dc:creator>
            <pubDate>Mon, 17 Nov 2025 15:01:10 GMT</pubDate>
            <atom:updated>2025-11-17T15:01:10.577Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*Zsa3a1rq3LWB6I4vY3m-ZA.png" /></figure><p>A system administrator (or sysadmin) is responsible for keeping servers, networks, and services running smoothly. The job is a mix of prevention, automation, troubleshooting, and security. A sysadmin must make sure systems stay online, users can work, and infrastructure is reliable — even when things break</p><p>I decided to learn system administration by solving real problems, not just reading documentation. So I built scripts, automated daily tasks, and experimented with real scenarios to understand how a sysadmin works in practice.</p><p>So Without further ado, let’s start!</p><h3>Script 1 : Server Monitoring</h3><p>I am a sysadmin. I need to see my server’s performance every 10 minutes: CPU usage, running tasks, storage availability, and the services that consume the most resources.</p><p>The native commands mpstat, free, df, ps and systemctl will be my allies. And after that, I’ll put my script on the crontab to repete the script every ten minutes.</p><pre>#!/bin/bash<br># /home/meda/server_monitor.sh<br>LOG_FILE=&quot;/home/meda/monitoring.log&quot;      # Path to the file where monitoring results will be saved<br>DATE=$(date &#39;+%Y-%m-%d %H:%M:%S&#39;)          # Gets the current date and time in a readable format<br><br>echo &quot;=======================================&quot;  <br>echo &quot;=== Server Monitoring - $DATE ===&quot;      # Title of the report with the date<br>echo &quot;&quot;                                            # Empty line for spacing<br><br>echo &quot;--- CPU Usage ---&quot;                           <br>mpstat 1 1 | grep &quot;all&quot;                       # Shows CPU statistics over 1 second (the &#39;all&#39; summary line)<br>echo &quot;Load average: $(cat /proc/loadavg)&quot;     # Shows system load averages (1, 5, and 15 minutes)<br>                                      <br>echo &quot;--- Memory Usage ---&quot;                       <br>free -h                                       # Displays RAM total, used, free in human-readable format<br><br>echo &quot;--- Disk Usage ---&quot;                     # Section: disk usage<br>df -h                                              # Shows disk space usage in human-readable format<br><br>echo &quot;--- Top 5 CPU Processes ---&quot;            # Section: top CPU-consuming processes<br>ps aux --sort=%cpu | head -6                  # Displays the 5+1 most CPU-heavy processes (header + 5 entries)<br><br>echo &quot;--- Top 5 Memory Processes ---&quot;         # Section: top memory-consuming processes<br>ps aux --sort=%mem | head -6                  # Displays the 5+1 most memory-heavy processes (header + 5 entries)<br><br>echo &quot;--- Failed Services ---&quot;                 # Section: systemd services that have failed<br>systemctl --failed                             # Lists failed or malfunctioning systemd services<br><br>echo &quot;==========================&quot;               # End of the monitoring report</pre><h3>Script 2 : User Manager</h3><p>I am a sysadmin. I needed a way to manage temporary user accounts without manually typing multiple commands. The goal is to create a user with a password, department info, and an expiration date and automatically delete the account when it expires.</p><pre>#!/bin/bash<br><br># This script automates user creation and deletion with expiration handling.<br><br>if [ &quot;$1&quot; = &quot;create&quot; ]; then<br>    echo &quot;Creating a new user:&quot;<br>    <br>    # Prompt for user information<br>    read -p &quot;Username: &quot; user<br>    read -p &quot;Department: &quot; dept<br>    read -p &quot;Expiration date (YYYY-MM-DD): &quot; expire<br>    read -s -p &quot;Password: &quot; pass<br>    echo<br><br>    # Create user with home directory, department as comment, and expiration date<br>    sudo useradd -m -c &quot;$dept&quot; -e &quot;$expire&quot; &quot;$user&quot;<br><br>    # Set user password<br>    echo &quot;$user:$pass&quot; | sudo chpasswd<br><br>    # Schedule account deletion on expiration date<br>    echo &quot;userdel -r $user&quot; | at &quot;$expire&quot;<br><br>    echo &quot;User $user created successfully!&quot;<br><br>elif [ &quot;$1&quot; = &quot;delete&quot; ]; then<br>    # Manual deletion mode<br>    read -p &quot;Username to delete: &quot; user<br>    sudo userdel -r &quot;$user&quot;<br>    echo &quot;User $user deleted successfully!&quot;<br><br>else<br>    # Usage guide<br>    echo &quot;Usage: $0 [create|delete]&quot;<br>fi</pre><p>And now we can just call <em>create_user.sh create</em> to create a knew user.</p><h3>Script 3 : Package Manager</h3><p>As a sysadmin, installing and removing software manually takes time and increases the risk of mistakes. I needed a simple way to automate this process using a Bash script, especially when managing multiple servers or repeated setups.</p><p>I created an interactive Bash script that lets me choose whether to install or uninstall a package. It updates the package list, installs software with confirmation disabled, or removes it cleanly, all from one command.</p><pre>#!/bin/bash<br><br># This script automates software installation and removal using apt package manager.<br><br>echo &quot;What do you want to do?&quot;<br>echo &quot;1. Install software&quot;<br>echo &quot;2. Uninstall software&quot;<br>echo &quot;3. Quit&quot;<br><br># User input<br>read -p &quot;Your choice (1-3): &quot; choice<br><br>if [ &quot;$choice&quot; = &quot;1&quot; ]; then<br>    # Install software<br>    read -p &quot;Name of the software to install: &quot; software<br>    sudo apt update &amp;&amp; sudo apt install -y &quot;$software&quot;<br><br>elif [ &quot;$choice&quot; = &quot;2&quot; ]; then<br>    # Uninstall software<br>    read -p &quot;Name of the software to remove: &quot; software<br>    sudo apt remove -y &quot;$software&quot;<br><br>elif [ &quot;$choice&quot; = &quot;3&quot; ]; then<br>    # Exit the script<br>    echo &quot;Goodbye!&quot;<br>    exit 0<br><br>else<br>    # Invalid option<br>    echo &quot;Invalid option!&quot;<br>    exit 1<br>fi</pre><h3>Script 4 : Block Server Access</h3><p>As a sysadmin, I needed to enforce access control based on time. The goal was to block all user logins after 22:00, except for two accounts: root and my own. This improves system security by preventing unauthorized or late-night activity.</p><p>Instead of using scripts or cron jobs, I implemented a clean and reliable rule-based approach using <strong>/etc/security/time.conf</strong>. By defining time restrictions at the PAM level, I can restrict login access system-wide based on usernames, terminals, and schedules.</p><p>Only root and my account are allowed to connect at any time. All other users are denied access during restricted hours.</p><pre># Time-based access control using /etc/security/time.conf<br># Syntax: services;ttys;users;times<br><br># Allow root to connect at all times<br>*;*;root;Al0000-2400<br><br># Allow my own user (meda) at all times<br>*;*;meda;Al0000-2400<br><br># Deny all other users outside allowed hours<br># &quot;!Al1000-0600&quot; means: not allowed between 22:00 and 06:00<br>*;*;*;!Al2200-0600</pre><h3>Script 5: Log Rotation</h3><p>As a sysadmin, I needed to prevent a log file from growing indefinitely. Large logs become hard to read, take storage space, and can eventually break applications or servers. I had to implement a log rotation mechanism that regularly archives old logs and keeps the main log clean.</p><p>I wrote a Bash script that checks the size of a log file. If it reaches a threshold, it creates a timestamped backup, archives it into a tar file, and clears both the old and new logs. This keeps logs manageable and ensures nothing is lost.</p><pre>#!/bin/bash<br># Log rotation script for the task_manager application<br><br># Path to the log file<br>LOG_FILE=&quot;/home/meda/task_manager/log.txt&quot;<br><br># Get log size using cksum (2nd field is byte size)<br>size=$(cksum &quot;$LOG_FILE&quot; | awk &#39;{print $2}&#39;)<br><br># Maximum allowed size before rotation (in bytes)<br>top=1000<br><br># Timestamp for backup naming<br>TIMESTAMP=$(date +&quot;%Y_%m_%d_%H_%M&quot;)<br><br># Check if log size exceeds the limit<br>if [ &quot;$size&quot; -ge &quot;$top&quot; ]; then<br><br>    # Create a backup copy with timestamp<br>    cp &quot;$LOG_FILE&quot; &quot;log_${TIMESTAMP}.txt&quot;<br><br>    # Add backup to a tar archive<br>    tar -rf logarchive.tar &quot;log_${TIMESTAMP}.txt&quot;<br><br>    # Clear the rotated log file<br>    &gt; &quot;log_${TIMESTAMP}.txt&quot;<br><br>    # Clear the main log file<br>    &gt; &quot;$LOG_FILE&quot;<br><br>else<br>    # Do nothing if size is below the threshold<br>    exit 0<br>fi</pre><h3>Script 6 : Server App Monitoring</h3><p>As a sysadmin, I needed a way to detect when an application server stops running. If the service goes down and nobody notices, users are blocked, data may be lost, and uptime suffers. Manual checking is too slow, I needed an automated, reliable alert system.</p><p>I wrote a Bash script that monitors the server by checking its process ID (PID). If the process is still running, nothing happens. But if the PID is missing, meaning the server is down, the script sends me an alert email and automatically attempts to restart the application.</p><pre>#!/bin/bash<br># status.sh — checks if the server process is running and alerts if not<br><br># Path to the PID file of the running app<br>PID_FILE=&quot;/home/meda/fifteen/app.pid&quot;<br><br># Read PID from file<br>PID=$(cat &quot;$PID_FILE&quot;)<br><br># Check if the process is still running<br>if ps -p &quot;$PID&quot; &gt; /dev/null 2&gt;&amp;1; then<br>    # Everything is fine<br>    exit 0<br>else<br>    echo &quot;Server is DOWN&quot;<br><br>    # Alert email info (fictional addresses)<br>    TO=&quot;alert@example.com&quot;<br>    FROM=&quot;monitor@example.com&quot;<br>    SUBJECT=&quot;TodoList Server is DOWN&quot;<br>    MESSAGE=&quot;The TodoList application server is not running. Restart attempts have begun.&quot;<br><br>    # Send the alert<br>    echo -e &quot;Subject: $SUBJECT\nFrom: $FROM\n\n$MESSAGE&quot; | msmtp &quot;$TO&quot;<br><br>    # Attempt to restart the application<br>    /home/meda/fifteen/startapp.sh<br>fi</pre><h3>Script 7 : Monitor login</h3><p>As a sysadmin, it’s critical to monitor who logs into your server. Unauthorized access can lead to data breaches or system misuse. Manually checking logs is slow and error-prone, so I needed a way to get <strong>instant alerts</strong> whenever someone connects via SSH.</p><p>I wrote a Bash script that continuously monitors the authentication log (/var/log/auth.log) for successful SSH logins. When a new login is detected, the script extracts:</p><ul><li>the username</li><li>the source IP address</li><li>the date and time of the connection</li></ul><p>Then it sends an alert email with these details. This provides real-time visibility into server access and allows me to respond quickly to suspicious activity.</p><pre>#!/bin/bash<br># SSH login monitor — sends email alerts on successful logins<br><br># Monitor auth.log in real time<br>sudo tail -f /var/log/auth.log | while read line; do<br><br>    # Check for successful SSH login<br>    if echo &quot;$line&quot; | grep -q &quot;Accepted password.*ssh2&quot;; then<br><br>        # Extract IP address<br>        IP=$(echo &quot;$line&quot; | grep -o &quot;from [^ ]*&quot; | cut -d&#39; &#39; -f2)<br><br>        # Extract username<br>        USER=$(echo &quot;$line&quot; | grep -o &quot;for [^ ]*&quot; | cut -d&#39; &#39; -f2)<br><br>        # Extract date and time<br>        DATE=$(echo &quot;$line&quot; | awk &#39;{print $1&quot; &quot;$2}&#39; | sed &#39;s/T/ /&#39; | cut -d&#39;.&#39; -f1)<br><br>        # Email information (fictional addresses)<br>        TO=&quot;alert@example.com&quot;<br>        FROM=&quot;monitor@example.com&quot;<br>        SUBJECT=&quot;New SSH Login Alert&quot;<br>        MESSAGE=&quot;🟢 NEW LOGIN - $DATE - User: $USER - IP: $IP&quot;<br><br>        # Send alert via email<br>        echo -e &quot;Subject: $SUBJECT\nFrom: $FROM\n\n$MESSAGE&quot; | msmtp &quot;$TO&quot;<br>    fi<br>done</pre><h3>Script 8 : Commands Restriction</h3><p>As a sysadmin, I needed to restrict a user’s administrative privileges. The goal was to allow a specific user to execute only <strong>three specific commands with sudo</strong>, while preventing access to all other administrative actions. This ensures security and minimizes the risk of misuse.</p><p>I configured the /etc/sudoers file to grant precise command-level permissions. Instead of giving full root access, I specified exactly which commands the user can run with sudo. For example, the user testy can only execute /bin/apt, /bin/cat, and /bin/ls. All other commands are blocked.</p><p>This approach enforces the <strong>principle of least privilege</strong>, which is essential in system security.</p><pre># Full root access for root user<br>root    ALL=(ALL:ALL) ALL<br><br># Members of the admin group may gain root privileges<br>%admin ALL=(ALL) ALL<br><br># Allow members of group sudo to execute any command<br>%sudo   ALL=(ALL:ALL) ALL<br><br># New restricted permissions for the &#39;testy&#39; user<br># This user can only run apt, cat, and ls with sudo<br>testy ALL=(ALL) /bin/apt /bin/cat /bin/ls<br><br># Include additional sudoers files from /etc/sudoers.d<br>@includedir /etc/sudoers.d</pre><h3>Bonus Scripts : Financial market index control</h3><p>As a sysadmin at Orange RDC, I was asked by the CEO to receive a <strong>daily email at 7 AM</strong> summarizing the main financial market indicators. Manually checking stock prices and indices each morning is inefficient, so I needed an automated way to collect and report the data.</p><p>I wrote a Bash script that fetches the latest prices for major indices (S&amp;P 500, NASDAQ, DOW JONES, CAC 40) and Bitcoin using Yahoo Finance’s API. The script formats the results and can be scheduled with <strong>cron</strong> to send an email every morning at 7 AM. This provides a quick, automated financial summary directly in the inbox.</p><pre>#!/bin/bash<br># Daily stock index summary script<br><br>echo -e &quot;📊 STOCK INDICES - $(date &#39;+%H:%M&#39;)&quot;<br><br># Function to fetch the price of a financial instrument<br>get_stock_price() {<br>    local symbol=$1<br>    local name=$2<br>    <br>    echo -n &quot;$name...&quot;<br><br>    # Fetch data from Yahoo Finance API with a timeout<br>    data=$(timeout 10 curl -s -A &quot;Mozilla/5.0&quot; \<br>        &quot;https://query1.finance.yahoo.com/v8/finance/chart/$symbol&quot;)<br>    <br>    # Extract the regular market price<br>    price=$(echo &quot;$data&quot; | grep -o &#39;&quot;regularMarketPrice&quot;:[0-9.]*&#39; | head -1 | cut -d&#39;:&#39; -f2)<br>    <br>    if [ -n &quot;$price&quot; ] &amp;&amp; [ &quot;$price&quot; != &quot;0&quot; ]; then<br>        printf &quot;%10.2f&quot; &quot; $price&quot;<br>    else<br>        echo -e &quot;N/A&quot;<br>    fi<br>}<br><br># Fetch main indices<br>get_stock_price &quot;^GSPC&quot; &quot;S&amp;P 500&quot;<br>get_stock_price &quot;^IXIC&quot; &quot;NASDAQ&quot;<br>get_stock_price &quot;^DJI&quot; &quot;DOW JONES&quot;<br>get_stock_price &quot;^FCHI&quot; &quot;CAC 40&quot;<br>get_stock_price &quot;BTC-USD&quot; &quot;BITCOIN&quot;<br><br>echo -e &quot;Updated: $(date &#39;+%H:%M:%S&#39;)&quot;</pre><p>And then, I Schedule this script in <strong>cron</strong> to run at 7:00 AM daily, and pipe the output into an email to the CEO. This ensures they receive <strong>automated, up-to-date financial information</strong> every morning without manual effort.</p><p>That’s it! My next goal is to try to implement theses scripts using Python. Dont forget to follow me for the next step.<br>Thanks for your reading, your suggestions are welcome.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=721867ba3306" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simulating the BGP Protocol: Understanding Internet Routing Between ISPs in the DRC (Orange…]]></title>
            <link>https://medium.com/@medamondonga4/simulating-the-bgp-protocol-understanding-internet-routing-between-isps-in-the-drc-orange-36f83549992e?source=rss-612d2f5198b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/36f83549992e</guid>
            <category><![CDATA[isp]]></category>
            <category><![CDATA[configuration]]></category>
            <category><![CDATA[bgp]]></category>
            <category><![CDATA[gns3]]></category>
            <dc:creator><![CDATA[medamondonga ]]></dc:creator>
            <pubDate>Wed, 22 Oct 2025 05:19:01 GMT</pubDate>
            <atom:updated>2025-10-22T05:19:01.946Z</atom:updated>
            <content:encoded><![CDATA[<h3>Simulating the BGP Protocol: Understanding Internet Routing Between ISPs in the DRC (Orange, Airtel, Vodacom, Africell)</h3><p>In the context of my <strong>AWS/restart program</strong> offered by AWS in partnership with Orange RDC, I was asked to reproduce the <strong>routing between the internet operators in the DRC (Orange, Airtel, Vodacom, and Africell)</strong>. The goal was to help me understand how the <strong>BGP protocol</strong> works.</p><p>For the total networking novice that I was a week before finishing this practical work, it seemed practically impossible. To tell the truth, I had long imagined networking as a particularly complex and arduous field in IT. I dreaded the physical efforts (transporting and configuring cables) more than I took the time to dive deep. And even if I’m still not that passionate about it, I’ve seen a side of networking that I find cool.</p><p>Anyway, let’s dive into our work, what is the BGP protocol?</p><p>The BGP (Border Gateway Protocol) protocol is a routing protocol that allows different Autonomous Systems (AS) to communicate with each other to exchange information about network availability.</p><p>We have <strong>routers A, B, C, and D</strong>. They are all connected to each other, but each router has its own subnets. If, for example, clients in subnet A want to access clients in subnet B, they will face a connectivity problem because two hosts not configured on the same network cannot communicate by default.</p><p>This is where <strong>BGP shows up</strong>!!</p><p>It will ensure that router A says “heyo, it’s me A, but in my subnet I also have a1, a2, a3, etc.”. And so, if B wants to reach a1, BGP will say “hey, I know the best path if you want to go to a1, follow me!”. And so on for all the other routers.</p><p>It’s a principle that seems simple, but know that this is exactly how the entire internet manages to work. Billions of connected networks that announce their networks and so on.</p><p>This is also how the internet works in the DRC. We have four ISPs: Orange, Airtel, Vodacom, and Africell. They are the ones who provide us with the internet connection. Every person living in the DRC is connected to at least one of these networks, and to get to the internet or just to communicate with their best friend who uses a different ISP, we use the BGP protocol.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/197/1*x5x2RzkM6nQeHDnwQjovhQ.png" /></figure><p>The IXP (Internet Exchange Point) serves as a central point; all networks point to it. When a client wants to go on the internet, the IXP redirects them to the ARPTC (Autorité de Régulation de la Poste et des Télécommunications du Congo), which will safely conduct their request.</p><p>Now that we know what it’s about, let’s see how we can configure it.</p><p>I still want to remind you that this is a simulation and that my level in networking is as low as that of an average person who has done some research on the internet, so please be understanding!</p><p>I used <strong>GNS3</strong> instead of Cisco Packet Tracer on the recommendation of my expert colleagues in networking, but I believe it could also work there.</p><p>I started by drawing my <strong>topology</strong> on paper, then I copiously reproduced it in GNS3:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*A-Wa6Bgfqp3wkWJ42lok-g.png" /></figure><p>Next, for each router, I configured the interfaces. For example, for the Orange network:</p><pre>reseauOrange#<br>reseauOrange#show ip interface brief<br>Interface                  IP-Address      OK? Method Status                Protocol<br>FastEthernet0/0            unassigned      YES unset  administratively down down<br>FastEthernet0/1            unassigned      YES unset  administratively down down<br>reseauOrange#conf t<br>reseauOrange(config)#interface FastEthernet 0/0<br>reseauOrange(config-if)#ip address 10.0.1.2 255.255.255.0<br>reseauOrange(config-if)#no shutdown<br>*Mar  1 00:01:22.243: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up<br>*Mar  1 00:01:23.243: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up<br>reseauOrange(config-if)#interface FastEthernet 0/1<br>reseauOrange(config-if)#ip address 192.168.10.1 255.255.255.0<br>reseauOrange(config-if)#no shutdown<br>reseauOrange(config-if)#do write<br>Building configuration...<br><br>*Mar  1 00:02:17.671: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up<br>*Mar  1 00:02:18.671: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up[OK]<br>reseauOrange(config-if)#<br>reseauOrange#show ip interface brief<br>*Mar  1 00:02:22.163: %SYS-5-CONFIG_I: Configured from console by console<br>reseauOrange#show ip interface brief<br>Interface                  IP-Address      OK? Method Status                Protocol<br>FastEthernet0/0            10.0.1.2        YES manual up                    up<br>FastEthernet0/1            192.168.10.1    YES manual up                    up</pre><p>Next, I assigned an ID to each router:</p><pre>routerOrange(config)#router bgp 100</pre><p>And I configured it so that it would consider the <strong>IXP</strong> as its <strong>neighbor</strong> and communicate all the other <strong>subnets</strong> it contains to it:</p><pre>routerOrange(config-router)#neighbor 10.0.1.1 remote-as 1000<br>routerOrange(config-router)#neighbor 10.0.1.1 ebgp-multihop<br>routerOrange(config-router)#network 10.0.1.0 mask 255.255.255.0<br>routerOrange(config-router)#network 192.168.10.0 mask 255.255.255.0<br>routerOrange(config-router)#do write<br>Building configuration...<br>[OK]</pre><p>Next, in the <strong>IXP</strong>, I call all the other <strong>AS</strong> (Autonomous Systems) as its <strong>neighbors</strong>:</p><pre>IXp(config)#router bgp 1000<br>IXp(config-router)#neighbor 10.0.1.2 remote-as 100<br>IXp(config-router)#neighbor 10.2.1.2 remote-as 200<br>IXp(config-router)#neighbor 10.0.0.2 remote-as 300<br>IXp(config-router)#neighbor 10.0.0.1 remote-as 500<br>IXp(config-router)#neighbor 10.2.0.2 remote-as 400<br>IXp(config-router)#do write<br>Building configuration...<br>[OK]</pre><p>The neighbors will automatically come with their announced subnets, and the IXP will in turn make them available to the other neighbors.</p><p>Now let’s verify our BGP on each router. We see that the IXP receives at least two networks from each of its neighbors:</p><pre><br>ixp#show ip bgp summary<br>Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd<br>10.0.0.1        4   500      39      39       14    0    0 00:29:35        2<br>10.0.1.2        4   100      33      39       14    0    0 00:29:36        2<br>10.0.2.2        4   300      33      38       14    0    0 00:29:43        2<br>10.1.1.2        4   200      33      38       14    0    0 00:29:41        2<br>10.2.0.2        4   400      33      39       14    0    0 00:29:39        2</pre><p>And that the <strong>Orange router</strong> receives 9, which is the total number of <strong>BGP networks</strong> besides itself:</p><pre>orange#show ip bgp summary<br>Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd<br>10.0.1.1        4  1000      40      34       11    0    0 00:30:18        9</pre><p>Let’s now <strong>add clients</strong> and try to reach our <strong>“internet”</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*DltZbESlSEZ1HaL2q2P-bw.png" /></figure><pre>PC1&gt; ping 8.8.9.9<br><br>84 bytes from 8.8.9.9 icmp_seq=1 ttl=252 time=110.093 ms<br>84 bytes from 8.8.9.9 icmp_seq=2 ttl=252 time=109.983 ms<br>84 bytes from 8.8.9.9 icmp_seq=3 ttl=252 time=107.206 ms<br>84 bytes from 8.8.9.9 icmp_seq=4 ttl=252 time=107.412 ms<br>84 bytes from 8.8.9.9 icmp_seq=5 ttl=252 time=108.944 ms</pre><p>And if we try to <strong>trace the path</strong> from the router, we see that our request goes first through the <strong>IXP</strong> then the <strong>ARPTC</strong>:</p><pre>PC1&gt; trace 8.8.9.9<br>trace to 8.8.9.9, 8 hops max, press Ctrl+C to stop<br> 1   192.168.10.1   10.090 ms  16.888 ms  15.083 ms<br> 2   10.0.1.1   45.569 ms  46.495 ms  45.615 ms<br> 3   10.0.0.1   76.957 ms  77.167 ms  75.145 ms<br> 4   *8.8.9.9   105.688 ms (ICMP type:3, code:3, Destination port unreachable)</pre><p>Finally, we can see that <strong>PC1</strong> (under Orange) can also reach <strong>PC2</strong> (under Airtel) even though they are both in a different network.</p><pre><br>PC1&gt; ping 10.1.1.2<br>84 bytes from 10.1.1.2 icmp_seq=1 ttl=253 time=67.623 ms<br>84 bytes from 10.1.1.2 icmp_seq=2 ttl=253 time=64.036 ms<br>84 bytes from 10.1.1.2 icmp_seq=3 ttl=253 time=65.851 ms<br>84 bytes from 10.1.1.2 icmp_seq=4 ttl=253 time=77.514 ms<br>84 bytes from 10.1.1.2 icmp_seq=5 ttl=253 time=65.505 ms</pre><p>And there you have it, our BGP is working! Every client can go wherever they want. Isn’t that wonderful!</p><p>Thanks for reading until the end, and I would be delighted to receive your feedback in the comments.</p><p>Bye!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36f83549992e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>