Tampilkan postingan dengan label Server. Tampilkan semua postingan
Tampilkan postingan dengan label Server. Tampilkan semua postingan

Sabtu, 15 Agustus 2026

A Practical Docker-Based Security and AI Lab

Hi everyone! Glad to have you here. On this page, I want to document what I built and tested on a small Ubuntu 22.04 VPS before the VPS service reaches the end of its subscription. Instead of letting the environment disappear without documentation, I decided to capture the main components, Docker containers, exposed services, and the purpose of each tool.

This activity was conducted for learning, security testing, compliance management, and experimenting with AI-related security tools. The environment was intentionally built using Docker, allowing each application to run as an isolated container that could be started, stopped, recreated, or removed independently.

What Was Running on the VPS?

The VPS hosted several applications. The main stack consisted of Eramba for GRC and compliance management, Open WebUI for the AI interface, Nginx Proxy Manager for reverse proxy and HTTPS management, and the supporting MySQL and Redis services required by Eramba. I also installed NVIDIA Garak for LLM security testing, while NocoDB and Metabase were used as additional experimentation platforms.

• Ubuntu 22.04 LTS – the operating system for the VPS.

• Docker – the container runtime used to deploy and isolate applications.

• Eramba – GRC, compliance, risk, policy, and control management.

• MySQL 8.0 – database service used by Eramba.

• Redis 7 – caching service used by Eramba.

• Open WebUI – web-based interface for interacting with AI models and APIs.

• Nginx Proxy Manager – reverse proxy and HTTPS management.

• NVIDIA Garak – LLM vulnerability and security testing framework.

• NocoDB – database-oriented collaboration and experimentation platform.

• Metabase – business intelligence and data visualization platform.


The Docker Environment

The environment was managed through Docker containers rather than installing each application directly on the Ubuntu host. This approach kept application components isolated from the underlying operating system and made the environment easier to maintain, recreate, and remove when required.

The following table summarizes the Docker containers identified in the environment and their observed runtime status.

Component

Container

Image

Observed Port

Observed Status

AI Interface

open-webui

ghcr.io/open-webui/open-webui:main

3000 → 8080

Up / healthy

Reverse Proxy

npm

jc21/nginx-proxy-manager:latest

80, 443, 81

Up

GRC Platform

eramba

ghcr.io/eramba/eramba:latest

8085 → 80

Up

Eramba Cache

eramba-redis

redis:7

Internal

Up

Eramba Database

eramba-mysql

mysql:8.0

Internal

Up / healthy

LLM Security Testing

garak

garak:latest

N/A

Exited (127)

Database Platform

nocodb

nocodb/nocodb:latest

8080

Exited (143)

BI Platform

metabase

metabase/metabase

3000

Exited (143)


The observed status represents the state of the Docker environment at the time of documentation. Up indicates that the container was running, while Up / healthy indicates that the container was running and its configured health check was passing. The Exited (127) status observed for Garak indicates that the container had stopped with exit code 127, which generally indicates that the requested command or executable could not be found or executed successfully.

1. Ubuntu 22.04 as the Base Operating System
Ubuntu 22.04 was used as the base operating system for the lab. The host provided the underlying CPU, memory, storage, networking, and Docker runtime required by the applications.

Typical commands used to inspect the host environment included:
cat /etc/*release
uname -a
free -h
df -h
docker version
docker info


2. Docker as the Application Platform
Docker became the main application platform on the VPS. Instead of installing Eramba, Open WebUI, Nginx Proxy Manager, and other applications directly into Ubuntu, each application was deployed as a container or as part of a containerized stack.

The most useful commands for documenting the environment are:
docker ps -a
docker images
docker network ls
docker volume ls
docker inspect <container_name>
docker logs <container_name>


3. Eramba – GRC and Compliance Platform
One of the main applications installed on the VPS was Eramba. I used it as a practical lab for GRC activities such as managing policies, controls, compliance requirements, risks, and audit-related information.
The Eramba deployment consisted of three main application containers/services:
• eramba – the main Eramba application.
• eramba-mysql – MySQL 8.0 database backend.
• eramba-redis – Redis 7 caching service.

The Eramba application was exposed through the host on port 8085 and forwarded to port 80 inside the container. MySQL and Redis were used as supporting backend services and were not treated as public-facing application endpoints.

The basic Docker verification command was:

docker ps
docker logs eramba
docker logs eramba-mysql
docker logs eramba-redis



4. DNS Records - Cloudflare
Cloudflare was used to manage the DNS records for the lab domain and to point the application subdomains to the VPS public IP address. Each application was assigned a dedicated subdomain, making the services easier to access and manage through separate hostnames.
The relevant DNS records were configured as A records with Cloudflare Proxy enabled. The www hostname was configured as a CNAME pointing to the main domain.
The configured hostnames included:

With Cloudflare Proxy enabled, incoming requests were routed through Cloudflare before reaching the VPS. Nginx Proxy Manager then handled the routing from each hostname to its corresponding Docker service.

The simplified request flow was:

Client → Cloudflare DNS/Proxy → VPS → Nginx Proxy Manager → Docker Service

This DNS configuration provided the foundation for the HTTPS and reverse proxy setup described in the next section.

5. Nginx Proxy Manager – Reverse Proxy and HTTPS
Nginx Proxy Manager (NPM) was installed to provide a convenient reverse proxy layer in front of web applications. This allowed multiple web applications to be hosted on the same VPS while using different hostnames and HTTPS configurations.
• HTTP: port 80
• HTTPS: port 443
• Nginx Proxy Manager administration: port 81

The following proxy host mappings were observed in the NPM configuration.



This configuration allowed external requests to reach the corresponding Docker services through HTTPS-enabled public hostnames without directly exposing each application's internal Docker service to the Internet.

6.  Open WebUI – AI Experimentation Platform
Open WebUI was another major component of the lab. It provided a browser-based interface for working with AI models and API-based AI services. The container was running from the ghcr.io/open-webui/open-webui:main image.

The Docker mapping observed in the environment was:
Host port 3000 → Container port 8080







The lab did not contain an Ollama, vLLM, LocalAI, LiteLLM, TGI, or llama.cpp model-server container. The AI interface was therefore used with an external/API-based model backend rather than a model server running as another Docker container on this VPS.

7. NVIDIA Garak – LLM Security Testing
I also installed NVIDIA Garak as an LLM vulnerability scanning and security testing tool. The purpose was to experiment with security testing techniques against AI systems, including testing an OpenAI-compatible model/API endpoint.
During the lab work, Garak was used together with an external DeepSeek API endpoint. This was useful for understanding how an LLM security scanner can be connected to an API-based model rather than requiring the model itself to run on the VPS.
The Docker container was named garak. In the final Docker snapshot, the container was stopped and showed exit code 127. This documentation records that state as observed; it should not be interpreted as proof that every previous Garak test failed.

One of the security tests I tried with NVIDIA Garak was Prompt Injection testing. The goal was to check how an AI model responds when it receives specially crafted prompts designed to influence or override its intended behavior.

For example, a Prompt Injection test can be performed with a command such as:

garak \
  --model_type openai.OpenAIReasoningGenerator \
  --target_name openai/gpt-4o-mini \
  --probes promptinject

The main parameters can be understood as follows:

  • --model_type specifies the Garak generator that will be used to communicate with the target model.
  • --target_name specifies the target model to be tested.
  • --probes promptinject tells Garak to run the Prompt Injection probe set.

In this example, Garak sends a series of test prompts to the target model and evaluates how the model responds to them. The purpose is not simply to check whether the model produces an incorrect answer, but to identify whether carefully crafted instructions can manipulate the model into ignoring or deviating from its intended behavior.

The result can then be used as an initial indication of how the AI application handles Prompt Injection attacks and whether additional controls are required around the model, application, system prompt, or user input handling.

8. NocoDB and Metabase – Additional Lab Experiments
NocoDB and Metabase were also deployed during the lifetime of the VPS. They were part of the experimentation environment.
• NocoDB – deployed using the nocodb/nocodb:latest image.
• Metabase – deployed using the metabase/metabase image.

9. High-Level Architecture
The overall environment can be understood as a small Docker-based lab with a reverse proxy in front of web applications and dedicated backend containers for Eramba.


Additional security/AI tooling:
Garak -> external/API-based LLM backend

Additional lab applications:
NocoDB, Metabase

10. What we Learned from This VPS Lab
• Docker makes it much easier to separate applications and their dependencies on a small server.
• A reverse proxy is useful when several web applications need to share one public IP address.
• Applications such as Eramba often depend on supporting services such as MySQL and Redis, so documenting the whole stack is more useful than documenting only the main container.
• AI interfaces and AI security testing tools do not necessarily require the model to run locally; they can also work with API-based model backends.
• A VPS can be used as a compact security lab for combining GRC, web infrastructure, AI experimentation, and security testing.
• Keeping a Docker inventory before terminating a server makes it much easier to rebuild the environment later.

11. Useful Commands for Capturing a VPS Before Retirement
If you are going to terminate or rebuild a VPS, I recommend capturing the following information first. These commands help preserve the technical inventory without needing to remember everything manually.

# Operating system
cat /etc/os-release
uname -a

# CPU and memory
lscpu
free -h

# Storage
df -h

# Docker version and configuration
docker version
docker info

# Containers
docker ps -a

# Images
docker images

# Networks
docker network ls

# Volumes
docker volume ls

# Container configuration
docker inspect <container_name>

# Logs
docker logs <container_name> > <container_name>-logs.txt 2>&1

12. Final Docker Inventory
The final inventory captured from docker ps -a showed the following notable containers:
garak
open-webui
npm
eramba
eramba-redis
eramba-mysql
nocodb
metabase

There were also several stopped temporary containers associated with earlier Python/package installation activities. Because their final purpose could not be reliably determined from docker ps -a alone, they are intentionally not described as production services in this document.

Thank you for taking the time to read through this write-up.

This lab was mainly a personal learning and experimentation project, and this documentation reflects what I tried, configured, and learned along the way. It is by no means a perfect setup or a definitive guide, but I hope some parts of it may be useful to others who are exploring similar technologies.

If you notice anything that could be improved, corrected, or approached differently, I would really appreciate your feedback. I am still learning, and sharing this is also a way for me to learn from others.

Thanks again for reading, and I hope you found something useful here. See you in the next experiment!


Minggu, 23 November 2025

How to Install Eramba using Dockers (Ubuntu 22.04)

Hi everyone! Glad to have you here. On this page, we’re going to talk about a powerful and helpful application for monitoring compliance within your organization: Eramba. This tool comes with several key benefits, such as:

  • Everything in one place. All your policies, controls, and compliance tasks stay organized in one clean dashboard.

  • Less manual hassle. It sends reminders, automates tasks, and helps with audits, so you don’t have to chase things one by one.

  • Easy-to-understand reports. You get clear dashboards and summaries that make it easy to see what’s going on.

  • Helps you manage risks. You can link controls to risks and quickly spot what needs attention.

  • Audit-ready. It keeps your evidence and tasks neat and tidy, making audits way less stressful.

  • Budget-friendly. It’s open-source, so you get solid features without heavy license costs.

  • Flexible. You can tweak it to fit the way your team works.


The requirements below are what you’ll need to ensure a smooth installation. These can be adjusted depending on your operating system or environment:

  • MySQL (database)
  • Redis (caching engine)
  • Eramba (application)
  • Cron (for scheduled batch processes)
  • Ubuntu 22.04 as the operating system
  • A 64-bit kernel and CPU with virtualization support
  • At least 4 GB of RAM plus 10 GB of swap space


Okay, let’s follow the steps below to begin the installation:

1. Check your hardware environment. Make sure it meets the minimum requirements:

a. Check your Operating System

#cat /etc/*release

#uname -a


b. Check your RAM (Random Access Memory)

#free -h



c. Check your Storage Capacity

#df -h


2. Set up Swap

This step is needed to make sure the server has enough disk space to use as temporary memory if the RAM gets full.

#fallocate -l 10G /swapfile

#chmod 600 /swapfile

#mkswap /swapfile

#swapon /swapfile

#echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

#free -h



3. Install the main packages needed for Eramba

First, update the system:

#apt update && apt upgrade -y


a. Install Eramba (the main Application). This step will also install the required packages for MySQL, Redis, and Cron.

#cd /root

#mkdir docker

#cd docker

#git clone https://github.com/eramba/docker


#nano .env

    Do this to set up the configuration file:

   DB_PASSWORD=[Password DB]

   CACHE_URL=Redis://?server=redis&port=6379&password=&timeout=3

   PUBLIC_ADDRESS=https://[IP Address Server]:8443 

   (In this guide, we configured Eramba to use port 8443 as its default.) 


#curl https://support-v3.eramba.org/ping.html 

 (The expectation status is Success)


Create a file 'nano docker-compose.yml' 

Create file: nano docker-compose.yml
version: "3.8"

services:
  mysql:
    image: mysql:8.4
    container_name: eramba-mysql
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: your_root_password
      MYSQL_DATABASE: eramba
      MYSQL_USER: eramba
      MYSQL_PASSWORD: your_eramba_password
    volumes:
      - eramba_mysql:/var/lib/mysql
    networks:
      - eramba-net

  redis:
    image: redis:7
    container_name: eramba-redis
    restart: unless-stopped
    networks:
      - eramba-net


Execute this command to run this file 'docker-compose.yml' 

#docker-compose up -d


This is output of the 'docker-compose.yml'. All service statuses (Eramba, MySQL, Redis, and Cron) are done.

b. Check the docker status

#docker ps


c. Check the MySQL Status (database)

#docker stats mysql


d. Check the Redis Logs (Caching Engine)

#docker logs redis

#redis-cli ping

(The expectation status is PONG)


e. Check the Cron Logs (Scheduler)
#docker logs cron

f.  Check the Eramba Logs

#docker logs eramba


g. Install Apache and PHP.  Eramba requires Apache, PHP, and some specific PHP extensions (*if needed).

#apt install -y apache2 php php-cli php-mysql php-xml php-mbstring php-curl php-zip php-gd php-intl php-opcache

#php -v


4.  Check the Eramba installation in your browser using https://localhost:8443 (or your DNS name https://yourdns.com). Then click 'Unlock power of GRC'.


5. Set up the Super Admin account.


6. From this screenshot, we can see that the Eramba installation and configuration were successful and that it’s ready to use for monitoring compliance.


That’s all for the guide on installing Eramba using Docker on Ubuntu 22.04. I hope the instructions were easy to follow and helpful.


Thank you.


References:

https://www.eramba.org/learning/courses/12/episodes/274 

Minggu, 01 Juni 2025

How to Extend the Disk Capacity in VirtualBox

Berikut cara menambahkan kapasitas Disk pada VirtualBox:
1. Buka aplikasi VirtualBox. Kemudian Klik 'File'>'Tools'>'Virtual Media Manager'

2. Klik Tab 'Properties'. Terlihat informasi Disk sebelumnya, 25GB.

3. Naikkan ukuran Disk menjadi 60GB.

4. Ukuran Disk pada VirtualBox berhasil ditambahkan.


Referensi:
https://recoverit.wondershare.co.id/computer-problems/increase-virtualbox-disk-size.html

Rabu, 30 April 2025

Enable Intel VT-x & Intel VT-d to Optimize Your Virtualization Experience

Hi Guys, kali ini saya ingin berbagi informasi mengenai pentingnya mengaktifkan Intel Virtualization Technology (VT-x) dan Intel VT-d pada BIOS. Kedua fitur ini sangat membantu dalam meningkatkan performa dan kompatibilitas saat menjalankan mesin virtual, seperti pada VirtualBox atau VMware. Dengan VT-x, virtualisasi berjalan lebih lancar dan efisien, sedangkan VT-d memungkinkan pengelolaan perangkat keras secara langsung oleh mesin virtual untuk performa yang lebih baik. Aktifkan fitur ini agar pengalaman virtualisasi kalian makin optimal, berikut caranya:

1. Masuk ke BIOS dengan menggunakan shortcut yang sesuai dengan merek perangkat masing-masing, seperti Del, F2, atau Esc saat komputer mulai dinyalakan.

2. Arahkan Tab ke Menu Security > Virtualization.


3. Enable kedua fitur: Intel VT-x & Intel VT-d.


Semoga informasi ini bermanfaat bagi teman-teman. Thank you.


Related articles:

My Pocket : How to Add Network Adapter on Windows 7

My Pocket : How to Connect Internet by DNS Client on RedHat Server


Senin, 26 Desember 2022

Troubleshoot Oracle Machine Off (fmadm faulty)

Tekan tombol # + tombol . untuk masuk ke dalam Server Oracle


-> show /

-> show /HOST

-> show /SYS

-> show /STORAGE

-> show /SYSTEM

-> show /SP

-> show faulty


-> start /SYS

Are you sure you want to start /SYS (y/n)? y

start: System faults or hardware configuration prevents power on.


-> start /SP/faultmgmt/shell

Are you sure you want to start /SP/faultmgmt/shell (y/n)? y


faultmgmtsp> fmadm faulty


faultmgmtsp> fmadm faulty -s


faultmgmtsp> exit


-> set /SYS/MB clear_fault_action=true

Are you sure you want to clear /SYS/MB (y/n)? y

Set 'clear_fault_action' to 'true'


-> start /SP/faultmgmt/shell

Are you sure you want to start /SP/faultmgmt/shell (y/n)? y


faultmgmtsp> fmadm repair /SYS/MB


faultmgmtsp> fmadm faulty

No problems found


faultmgmtsp> exit


-> start /SYS

Are you sure you want to start /SYS (y/n)? y

Starting /SYS


=========Command Masuk OS====================================

-> start /HOST/console

Are you sure you want to start /HOST/console (y/n)? y

Serial console started.  To stop, type #.

console login: abc

Password:


-bash-3.2$ su -

Password:

# bash


Atau 


->start /SP/console


=========Command Collect Data Explorer pertama kali===========

->explorer -g


=========Command Masuk Bash===================================

# su - oracle

-bash-3.2$ pwd

-bash-3.2$ ls

-bash-3.2$ ps -ef

-bash-3.2$ ps -ef | grep xfile

-bash-3.2$ status

-bash-3.2$ exit

logout


Terima kasih banyak untuk rekan kerja saya yang sudah berbaik hati mengajarkan ilmu ini.


Commands to Check HP Hardware

#hostname

#date

#uname -a

#ps -aux

#cat /etc/*release

#cat /etc/SuSE-release


#cd /opt/ahs/AHSdownload

#hpasmcli

>show server

>show powersupply

>show temp

>show iml

>exit


#cd /patch

#ls -lrth

#hplog -v

How to Collect Explorer Data on Oracle Solaris

-bash-3.2$ bash

bash-3.2$ su -

Password:

# bash

# explorer

# ls /opt/SUNWexplo/bin/explorer

#ls /opt/SUNWexplo/output/

# exit

-> set /SP/diag/snapshot/ dump_uri=ftp://abc:abc@10.X.X.X/.

Set 'dump_uri' to 'ftp://abc:abc@10.X.X.X/.'

->

ORACLESP-abc login: root

Password:

-> show /SP/diag/snapshot/



Shutdown Server (Oracle) via Serial Console

>showdomainstatus -a : lihat status

>console -d 0 : Masuk OS

# init 6

#. kalau mau keluar dari OS

Poweroff di Solaris #init 6

Ganti disk dari A ke B buat dicek


Setelah ganti disk:

Cek lewat console server Oracle

#format : cek disk

#mount /dev/dsk/nama_disk_tambahs0_dibelakang

#vi /etc/system : edit filesystem


Linux Command for Checking a Server Performance

ifconfig

uname -a

ifconfig

ip addr

ip route

cat /etc/*release -

cat /etc/fstab

date

top

lscpu

df -h 

df -ih

vmstat -S M

lsblk

dmidecode -s system-serial-number

dmidecode | grep -i serial

dmidecode | grep -A3 '^System Information'

grep -i "hardware error" /var/log/mcelog

lvm pvscan

tail -f /var/adm/messages

tail -f /var/log/messages 

tail -f /var/log

tail -f /var/log/syslog

ls –al /var/crash/`hostname`/*

uptime

last | grep reboot

more /sys/class/fc_host/host?/port_state

free -h : check memory-swap

watch -n 1 free -h : check memory-swap (realtime)

HP-UX

uname -a

cat /etc/fstab

machinfo

ls -l /dev/rdsk | wc -l

diskinfo /dev/rdsk/namadisk

cat /etc/rc.config.d/netconf


command cari file berdasarkan tanggal

find . -printf "%T@ %Tc %p\n" | sort -n


===================================================

Tambahan untuk command Oracle OS


df -o i

prtdiag -v

zpool status

luxadm -e port

metastat

zoneadm list -icv

zpool list

zpool status

explorer -k -w default,smfextended,localzones,ldom

kdmrc

mpstat -P ALL


Related articles:

My Pocket : Common Commands in the Linux Terminal

My Pocket : Essential Commands for Installing on Red Hat Enterprise Linux (RHEL)