Home Lab Documentation

Bit of history

When I started working at a real business I realized I needed a home lab to test out different programs and networking protocols to ensure I did not break anything where I worked

I also needed to test out services for the Security Daemons as head of White Team so here is some basic documentation with the confidential information blurred out.

person using MacBook Pro
person using MacBook Pro
two men in suit sitting on sofa
two men in suit sitting on sofa

Documentation and Disclaimers

Have a look at the equipment I am working with and the documentation I have written so far! I update it regularly.

The passwords and confidential information was taken out so don't try and use my SSH credentials!

Home Lab at Home

Ubuntu Server Specs

2 core pentium processor with 6GB of DDR2 RAM

668 GB original hard drive

140 GB new SSD


Plans for Old Server

  • Copy Data and pictures to another drive

  • Rewrite old drive with ubuntu server

  • Set up SSH

  • Run Home Assistant

  • Run DNS server

    • DNS Filtering

    • Ad blocking

    • Possible honeypot?


Fun projects for new Raspberry Pi 5 4GB

  • Network Traffic Analysis with Elastic Stack

  • Phishing Detector

  • Network Intrusion Detection System

  • Vulnerability Scanner

  • IoT Security Monitoring

  • Password Cracking Lab




Home server

12/29/2024

Name: brandon

Server name: homeserver

Username: main

Password:


Operations

Downloaded and installed Ubuntu server 24.10 on 12/29/2024

No internet config

After Ubuntu is installed run ubuntu-drivers list –recommended -gpgpu

This server will be connected on the home network to run as a DNS server.


Home Lab Documentation

Ventoy

Copied Ubuntu server and desktop to Ventoy drive on 11/7/2024 (potential YouTube video on Ventoy setup?)

Ubuntu Server

Installed Ubuntu Server 24.10 on 11/7/2024

Hardware: Old Dell All-in-One with touchscreen, AMD A9 processor, and 8GB DDR4 RAM

Login credentials:

IP address: 100.69.1.106 (DHCP-assigned on network)

Display setting: Screen turns off after 2 minutes

11/23/2024: Added user "brandon" for SSH access (non-root)

Updates

11/23/2024 - System update completed at 11:08 AM. No services installed.

Security Plan

Secure SSH 11/23/2024

  1. Backup SSH config

    1. Sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak

  2. Disable Root Login and change Port

    1. Sudo nano /etc/ssh/sshd_config

    2. Permitrootlogin No

    3. Port 2202

    4. LoginGraceTime 2m

  3. Restart SSH

    1. Sudo systemctl restart ssh

    2. Sudo systemctl status ssh

  4. Update Firewall Rules

    1. Sudo ufw allow 2200/tcp

    2. Sudo ufw delete allow 22/tcp

  5. Setting up SSH Keys

    1. Folder for SSH Keys: mkdir ssh_keys

    2. Change permissions for folder:

    3. Sudo ssh-keygen -t rsa -b 4096

    4. Password set to WhowasinParis!1

  6. Disable Password Authentication

    1. Sudo nano /etc/ssh/sshd_config

    2. Comment in PasswordAuthentication no

Install Fail2ban

Services to Install

Jellyfin

Nextcloud

VPN

Webserver to test logins

DNS server

Homarr

Shell Scripts

12/10/2024

Creating a Bash script for automated system updates

Setting up a monthly cronjob for server updates (runs at 3 AM on the first of each month)

Bash Scripts for Updates

nano update_server.sh

#/bin/bash echo "Upgrading package lists..." sudo apt update echo "Upgrading installed packages..." sudo apt -y upgrade echo "Removing unused packages..." sudo apt -y autoremove echo "Cleaning up..." sudo apt -y autoclean echo "Server update complete!"

Save the file and make it executable using the following command

chmod +x update_server.sh

The following command is to execute the code

./update_server.sh

Next we will modify the cronjob to run on the first of every month at 3am

crontab -e

0 3 1 * * sudo /usr/bin/apt update && sudo /usr/bin/apt -y upgrade && sudo /usr/bin/apt -y autoclean && sudo /usr/bin/apt -y autoremove

Now the cronjob will run the same commands as the script we wrote but on the first of every month at 3 am.

Raspberry Pi

Planned use: VPN, router/DNS filtering, and firewall

Home Assistant

These are two Different Labs

Got a Project in Mind?

want to collaborate?
Email: brandondudas05@gmail.com

Or maybe you need IT help?

LinkedIn

Lets get in contact!