163 lines
4.2 KiB
Markdown
163 lines
4.2 KiB
Markdown
# Project 1: Home Lab Setup
|
|
|
|
## Project Overview
|
|
This project documents the setup of a basic home lab environment using VirtualBox and Ubuntu Server 22.04 LTS.
|
|
|
|
## Environment Details
|
|
- **Host System**: Windows 11
|
|
- **Hypervisor**: Oracle VirtualBox
|
|
- **Guest OS**: Ubuntu Server 22.04 LTS
|
|
- **Resources Allocated**:
|
|
- CPU: 2 cores
|
|
- RAM: 2GB
|
|
- Storage: 20GB
|
|
- Network: NAT + Host-only adapter
|
|
|
|
## Setup Steps
|
|
|
|
### 1. VirtualBox Installation ✅
|
|
- Successfully installed VirtualBox
|
|
- Created project directory structure
|
|
|
|
### 2. Ubuntu Server VM Creation ✅
|
|
- [x] Download Ubuntu Server 22.04 LTS ISO
|
|
- [x] Create new VM in VirtualBox
|
|
- [x] Configure VM settings (CPU, RAM, Storage)
|
|
- [x] Configure network adapters
|
|
- [x] Install Ubuntu Server
|
|
- [x] Basic system configuration
|
|
- [x] Network setup
|
|
|
|
### 3. Network Configuration ✅
|
|
- [x] Configure NAT adapter for internet access
|
|
1. Verify IP address configuration ✅
|
|
2. Test internet connectivity ✅
|
|
```bash
|
|
ping 8.8.8.8 # Success
|
|
ping google.com # Success
|
|
```
|
|
|
|
- [x] Configure Host-only adapter for direct host communication
|
|
1. Verify second network interface ✅
|
|
```bash
|
|
ip addr show enp0s8
|
|
# Output shows:
|
|
# inet 169.254.0.2/16 brd 169.254.255.255 scope global enp0s8
|
|
```
|
|
2. Test host connectivity ✅
|
|
```bash
|
|
# Successfully pinged host (169.254.167.242)
|
|
# Round-trip time (RTT) avg: 2.846ms
|
|
```
|
|
|
|
- [x] Document network configuration:
|
|
- NAT adapter IP (enp0s3): 10.0.2.15/24
|
|
- Host-only adapter IP (enp0s8): 169.254.0.2/16
|
|
- Default gateway: 10.0.2.2
|
|
- Host IP: 169.254.167.242
|
|
|
|
### Current Status (Project Paused)
|
|
- ✅ Basic VM Setup: Complete
|
|
- ✅ Network Configuration: Complete
|
|
- ✅ Security Measures: Complete
|
|
- ✅ System Monitoring: Complete
|
|
- ✅ Service Deployment: Complete
|
|
- Apache web server
|
|
- MySQL database
|
|
- ⏸️ Advanced Networking: Paused
|
|
- Future enhancement opportunity
|
|
|
|
### Next Steps
|
|
1. Advanced Networking
|
|
- [ ] DNS configuration
|
|
- [ ] Network services
|
|
- [ ] Advanced firewall rules
|
|
|
|
### 4. Basic Security Setup ✅
|
|
- [x] User Management ✅
|
|
- Created sysadmin user with sudo privileges
|
|
- Enhanced hugh user security
|
|
|
|
- [x] SSH Configuration ✅
|
|
- Installed and configured OpenSSH server
|
|
- Implemented key-based authentication
|
|
- Disabled password authentication
|
|
- Applied security hardening settings
|
|
|
|
- [x] UFW Firewall Setup ✅
|
|
- Installed and configured UFW
|
|
- Set default policies (deny incoming, allow outgoing)
|
|
- Allowed required services:
|
|
- SSH (port 22)
|
|
- HTTP (port 80)
|
|
- HTTPS (port 443)
|
|
- Host machine access (169.254.167.242)
|
|
- Verified connectivity
|
|
|
|
### 5. System Monitoring and Maintenance ✅
|
|
- [x] Monitoring Tools
|
|
- Installed and configured htop
|
|
- Set up Netdata for system metrics
|
|
- Configured Logwatch for log monitoring
|
|
|
|
- [x] Maintenance Procedures
|
|
- Implemented backup strategy with rsync
|
|
- Configured automated updates
|
|
- Set up log rotation
|
|
|
|
### Current Status
|
|
- ✅ Basic VM Setup: Complete
|
|
- ✅ Network Configuration: Complete
|
|
- ✅ Security Measures: Complete
|
|
- ✅ System Monitoring: Complete
|
|
|
|
## Security Configuration Status
|
|
- [x] User Management
|
|
- [x] Admin user created
|
|
- [x] Sudo privileges configured
|
|
- [x] SSH Access
|
|
- [x] SSH server installed
|
|
- [x] Key-based authentication configured
|
|
- [x] Root login disabled
|
|
- [x] Firewall
|
|
- [x] UFW installed
|
|
- [x] Basic rules configured
|
|
- [x] SSH access allowed
|
|
|
|
## Commands and Configurations
|
|
|
|
### Network Configuration Commands
|
|
```
|
|
|
|
### SSH Configuration
|
|
```conf
|
|
# Key SSH configuration settings (/etc/ssh/sshd_config)
|
|
PermitRootLogin no
|
|
PasswordAuthentication no
|
|
AllowUsers admin
|
|
```
|
|
|
|
### UFW Rules
|
|
```bash
|
|
# View UFW status
|
|
sudo ufw status verbose
|
|
|
|
# Basic allowed services
|
|
sudo ufw status numbered
|
|
```
|
|
|
|
## Additional Documentation
|
|
- [Security Setup Details](security-setup.md)
|
|
- [Lessons Learned & Challenges](lessons-learned.md)
|
|
|
|
## Project Completion Summary
|
|
1. Successfully set up Ubuntu Server VM
|
|
2. Implemented basic security measures
|
|
3. Configured monitoring and maintenance
|
|
4. Deployed web and database services
|
|
5. Documented all configurations and procedures
|
|
|
|
## Future Enhancements
|
|
- Advanced networking features
|
|
- Additional service deployments
|
|
- Performance optimizations |