Setting Up Splunk: Basics & Configuration
Security and Pentest Home Lab Environment
title: Part 10 - Ubuntu Setup & Splunk SIEM Installation date: 2025-06-16 categories: [Lab] tags: [Splunk, Ubuntu, VirtualBox, SIEM, DFIR, Linux, Security] description: Install and configure Splunk SIEM in a segmented lab environment permalink: /posts/HomeLab-Splunk —
In this module, we will set up Splunk (a popular SIEM tool) on a new Ubuntu VM. The VM will be assigned to the SECURITY
network segment in pfSense
. We’ll also configure the Splunk Universal Forwarder on the Windows Server 2019 (DC)
to forward logs into Splunk for monitoring.
📥 Download Ubuntu ISO
- Go to the official download page:
Download Ubuntu Desktop - Download the latest LTS version (e.g.,
22.04.3 LTS
)- 💾 The ISO is around 5GB
After the download completes, you will have a .iso
image file ready for use.
💻 Create the Ubuntu VM
- In VirtualBox, click Tools → New
- Give the VM a name and select the downloaded ISO file
- Enable “Skip Unattended Installation” → Click Next
- Set Base Memory to
4096MB
→ Click Next - Set Hard Disk Size to
100GB
→ Click Next - Review settings and click Finish
🗂️ Move VM to Group
- Right-click the new VM → Move to Group →
Home Lab/Security
- Your VM group structure should reflect the segmentation
⚙️ Configure VM Settings
- Select the VM → Click Settings
- Go to System → Motherboard
- Set Boot Order:
Hard Disk
, thenOptical
- Uncheck
Floppy
- Set Boot Order:
- Go to Network → Adapter 1
- Attached to:
Internal Network
- Name:
LAN 4
- Attached to:
- Click OK to save
🧰 Install Ubuntu OS
- Start the VM → Press
Enter
at the prompt to launch the GUI installer Follow the installation steps:
- Select Language → Click Install Ubuntu
- Select Keyboard Layout → Click Continue
- Enable:
Install third-party software...
→ Click Continue - Click Install Now → Confirm with Continue
- Select Timezone → Click Continue
- Enter user details (username, password, hostname) → Click Continue
- After installation finishes → Click Restart Now
When prompted, press
Enter
to reboot into your new system- Log in with your password
🚀 Post-Install Setup
🧾 Complete Ubuntu Welcome Wizard
- Click Skip when asked to connect online accounts
- Click Next through system info screens
- Choose “No, don’t send system info” → Click Next
- Disable unnecessary features → Click Next
- Click Done to close the wizard
📦 Install Guest Additions
- In the VM window, go to: Devices → Insert Guest Additions CD Image
- The CD will appear in the dock → Click to open
- In the file window, right-click → Open in Terminal
Run the following command:
1
sudo ./VBoxLinuxAdditions.run
Once the Guest Additions install completes:
- Close the Terminal
- Right-click the disk icon (Guest Additions) in the dock
- Select Eject to remove the virtual CD
🔃 Installing System Updates
- Open a Terminal using
Ctrl + Alt + T
Run the following command:
1
sudo apt update && sudo apt full-upgrade
If updates are available, press Enter
to begin the installation
Keeping the system updated ensures compatibility and stability for Splunk.
📸 Creating a VM Snapshot
Before moving on, take a snapshot of the clean Ubuntu install:
- Shut down the Ubuntu VM
- Click the hamburger menu (☰) next to the VM name → Select Snapshots
- Click Take to create a new snapshot
- Enter a descriptive name (e.g.,
Ubuntu Clean Install
) → Click OK - Return to the VM overview by clicking Details in the hamburger menu
Snapshots let you revert the VM to this clean state at any time.
🧰 Splunk Installation on Ubuntu
In this module, we’ll walk through downloading and installing Splunk Enterprise on your Ubuntu VM. This tool is essential for log collection and SIEM functionality in your security lab.
🔽 Downloading Splunk
🌐 Official Download (Latest Version)
- On your
Ubuntu
VM, open a browser and go to the official Splunk download page:
Splunk Enterprise Free Trial - Click
Download Now
under the Linux (.deb) section. - Accept the agreement and click
Access Program
to begin the download. - You’ll need to create an account if you haven’t already:
- Fill out the form
- Accept the agreement
- Click
Create the Account
💡 Optional: Direct Download for v9.1.2
If you want to skip account creation and use version 9.1.2, download it directly:
Splunk Enterprise 9.1.2 - Linux (.deb)
💽 Installing Splunk
📁 Navigate to the Downloads Folder
Open a terminal (Ctrl + Alt + T
) and run:
1
cd Downloads
Before installing Splunk, ensure the curl
package is installed (Splunk may rely on it for various network-related tasks):
1
sudo apt install curl
Enter your password when prompted.
🛠️ Installing Splunk
Run the following command to install Splunk from the .deb
package:
1
sudo dpkg -i splunk-9.1.2-b6b9c8185839-linux-2.6-amd64.deb
⚠️ Note: If you downloaded a newer version of Splunk, the filename may differ. Replace the filename above with the actual name of the file you downloaded.
🚀 Starting Splunk for the First Time
Launch Splunk and accept the license agreement:
1
sudo /opt/splunk/bin/splunk start --accept-license --answer-yes
You’ll be prompted to set up an admin username and password. These credentials will be used to access the Splunk web interface.
🌐 Accessing the Splunk Web Interface
Once Splunk is running, you can access it in your browser at:
1
http://127.0.0.1:8000
Log in using the credentials you just created.
🔁 Optional: Enable Splunk to Start on Boot
If you’d like Splunk to automatically start when the system boots, run:
1
sudo /opt/splunk/bin/splunk enable boot-start
💡 This step is optional. If you skip it, you’ll need to manually start Splunk each time with the start command shown earlier.
📸 Creating a Snapshot
Before proceeding, it’s a good idea to take a snapshot of the virtual machine in case you need to roll back.
- Power off the VM.
- Click the Hamburger menu next to the VM in VirtualBox.
- Navigate to Snapshots.
- Click on Take to create a new snapshot.
- Provide a clear, descriptive name for easy reference.
⚙️ Configuring Splunk to Receive Data
Open Splunk by visiting the following URL in your browser:
1
http://127.0.0.1:8000
Log in using your admin credentials. Then:
- Click on Settings in the top navigation bar.
- Under Data, select Forwarding and receiving.
- In the Receive data section, click Add new.
- Enter the following port to listen on:
9997
🧲 Universal Forwarder?
The Splunk Universal Forwarder is a lightweight agent that collects and forwards log data from a source system to a Splunk server. It’s commonly deployed on endpoints like servers and workstations to capture local events.
📥 Downloading the Forwarder
On your Windows Server, open a browser and navigate to:
- Sign in with your Splunk account when prompted.
- Under the Windows tab, find the 64-bit installer and click Download Now.
⚡ Optional: You can directly download version 9.1.2 using the link below:
🔗 Splunk Universal Forwarder 9.1.2 (.msi) - Direct Download
🛠️ Installing the Universal Forwarder
- Once downloaded, double-click the
.msi
file to launch the installer. - Accept the license agreement by checking the top box, then click Next.
- When prompted, enter a username and password for the Forwarder service.
- ✅ It’s recommended to use the same admin credentials created on your Splunk server.
🌐 Get the Splunk Server IP Address
To forward logs, the Universal Forwarder needs the IP address of your Ubuntu VM running Splunk.
On your Ubuntu machine, run the following command:
1
ip a