A hands-on engineering guide to Identity-Based Networking, Microsegmentation, and Least Privilege.
We are building a local Zero Trust ecosystem. Even though these machines are in the same room, they will communicate through an encrypted identity-aware mesh.
VirtualBox or VMware Workstation installed on your host.
Ubuntu 22.04 or 24.04 LTS Desktop or Server image.
Tailscale account linked to Google or GitHub SSO.
Create a new virtual machine using VirtualBox or VMware.
OS: Ubuntu
Once Ubuntu is installed update the system:
sudo apt update sudo apt upgrade -y
Install Tailscale inside the Ubuntu VM.
curl -fsSL https://tailscale.com/install.sh | sh
Start Tailscale and authenticate using your SSO account.
sudo tailscale up
A browser link will appear. Login using your Google or GitHub account.
Find the server's identity-based network address.
tailscale ip
Example output:
100.92.10.5
Download and install Tailscale on your host machine.
https://tailscale.com/download
Login using the same SSO account.
Open the Tailscale dashboard and confirm both machines appear.
Devices ✔ lab-server ✔ your-laptop
This confirms identity-based connectivity.
Install Python and start a simple web server.
sudo apt install python3 -y python3 -m http.server 8080
Test access from your laptop:
http://TAILSCALE_IP:8080
Open the Tailscale ACL editor and restrict access to only port 8080.
{
"acls": [
{
"action": "accept",
"src": ["*"],
"dst": ["lab-server:8080"]
}
]
}
This blocks all other services including SSH.
nano webapp.sh
Paste:
#!/bin/bash python3 -m http.server 8080
chmod +x webapp.sh
sudo nano /etc/systemd/system/webapp.service
Add:
[Unit] Description=Demo Web App After=network.target [Service] ExecStart=/home/ubuntu/webapp.sh Restart=always User=ubuntu [Install] WantedBy=multi-user.target
sudo adduser junioradmin
Create failed login attempts to generate entries in /var/log/auth.log.
ssh fakeuser@localhost su wronguser
Modern security teams often use AI assistants to quickly interpret logs and detect anomalies. In this lab the learner will use an LLM to analyze authentication failures.
The AI acts as a SOC assistant, explaining what happened and identifying suspicious patterns.
Copy entries from:
/var/log/auth.log
Then ask an AI assistant:
journalctl -u webapp
Generate some "noise" in the logs by attempting failed logins:
ssh fakeuser@localhost su wrongpassword
Now analyze logs from /var/log/auth.log using an LLM.
To expand your knowledge of Zero Trust systems explore: