This document is a step-by-step execution checklist used for video demonstration and verification.
- Droplet: 1GB RAM / 1 vCPU
- Name:
TestDroplet - Tag:
UbuntuDroplet - OS: Ubuntu LTS
- Authentication: SSH key only
ssh-keygen -t ed25519 -f <filename> -C "username"uname -a
lsb_release -a
whoamiHost User1
Hostname <SERVER_IP>
User root
IdentityFile <PATH_TO_KEY>useradd -m -s /bin/bash mukuldk
usermod -aG sudo mukuldk
passwd mukuldksudo apt update -y && sudo apt upgrade -y
sudo apt install unattended-upgrades
sudo dpkg-reconfigure --priority=low unattended-upgradesHost User1
Hostname <SERVER_IP>
User root
IdentityFile <PATH_TO_KEY>
Host mukuldk
Hostname <SERVER_IP>
User mukuldk
IdentityFile <PATH_TO_KEY>- File created locally:
./Config/sshd_config
rsync -av ./Config/sshd_config mukuldk:~/Config/mkdir ~/Config_default
sudo cp -r /etc/ssh ~/Config_default/sudo cp ~/Config/sshd_config /etc/ssh/sshd_config
sudo systemctl restart sshssh User1 # blocked
ssh mukuldk # allowedsudo apt install ufw fail2ban nginx -ysudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow OpenSSH
sudo ufw allow "Nginx Full"
sudo ufw enablesudo ufw status verbose- fiil2ban config
./Config/jail.local
sudo fail2ban-client status
sudo fail2ban-client status sshdsudo vim /var/www/html/index.nginx-debian.htmlContent:
This page is served from the HOST virtual machine
curl http://localhost
curl http://<SERVER_IP>sudo snap install lxd
sudo usermod -aG lxd mukuldk
newgrp lxdsudo lxd initChoices used:
- Clustering: no
- Storage: dir
- Bridge: lxdbr0
- IPv4: auto
- IPv6: no
- Remote access: no
sudo lxc launch ubuntu:22.04 cont1sudo lxc exec cont1 -- bashsudo ufw allow in on lxdbr0
sudo ufw route allow in on lxdbr0
sudo ufw route allow out on lxdbr0apt update && apt install nginx -yvim /var/www/html/index.nginx-debian.htmlcurl http://localhostExpose container nginx on host port 8080:
sudo lxc config device add cont1 nginx-service proxy \
listen=tcp:0.0.0.0:8080 \
connect=tcp:127.0.0.1:80| URL | Expected Result |
|---|---|
http://<SERVER_IP> |
Host Nginx page |
http://<SERVER_IP>:8080 |
LXD Container Nginx page |
- Host uses native port 80
- Container nginx is isolated and exposed via LXD proxy
- Demonstrates security, isolation, and production-style setup
✅ Task Completed Successfully