NDC & PKI
[Day 5] 5. Sharing Internet Access Between VMs Using Clear OS
D
DITISS AdminSetup Overview
We require two Virtual Machines for this lab:
-
VM1 (One Adapter):
- Adapter: Host-only (cannot directly access the internet).
- OS: Debian or Windows (your choice).
-
VM2 (Two Adapters):
- Adapter 1: Host-only (to communicate with VM1).
- Adapter 2: NAT (to access the internet).
- OS: Clear OS (configured as a gateway).
Goal
Enable internet access on VM1 via VM2 (Clear OS)
Steps to Set Up Clear OS as a Gateway
1. Create and Configure the Clear OS Machine
-
Create the VM:
- Name the VM folder: .
ClearOS - OS Type: .
Red Hat Enterprise 64-bit - RAM: 4GB.
- Storage: Default settings.
- Name the VM folder:
-
Configure Network Adapters:
- Adapter 1: Host-only (e.g., ) for communication with VM1.
VMNET4 - Adapter 2: NAT for internet access.
- Adapter 1: Host-only (e.g.,
-
Install Clear OS:
- Attach the Clear OS ISO and boot the VM.
- Turn ON both Ethernet adapters and verify their IPs.
- Set a root password and click "Done" to complete the installation.
2. Configure Clear OS
-
Access Clear OS Admin Interface:
- Use a browser to access Clear OS: .
https://<external_ip>:81
- Use a browser to access Clear OS:
-
Gateway Mode:
- Configure Clear OS to operate in Gateway Mode.
- Set the DNS Server to (Google) or
8.8.8.8.192.168.80.2
-
Community Edition:
- Select Community Edition and proceed with setup.
-
Environment Selection:
- Choose Education as the environment.
-
Marketplace Setup (Optional):
- Skip installing additional packages for now.
-
Domain Configuration:
- Setting a domain is optional and can be skipped.
3. Enable Internet Access for VM1
- Start both VMs (VM1 and VM2).
- Ensure VM2 (Clear OS) is operational and both adapters are active:
- Host-only Adapter: Communication with VM1.
- NAT Adapter: Internet access.
- Test internet connectivity on VM1:
- VM1 should now access the internet via Clear OS (VM2).
4. Block Internet Access for VM1
-
Access Firewall Rules:
- Use the Clear OS admin interface in the browser.
- Identify VM1’s Host-only IP address.
-
Create a Rule:
- Add a firewall rule to deny internet access for VM1's IP.
-
Test the Connection:
- Attempt to access the internet on VM1.
- Internet access should now be blocked.
Troubleshooting
-
Reversed Network Adapters:
- If External (NAT) and LAN (Host-only) are reversed in Clear OS, swap their configurations in VM settings.
- Correct configuration:
- External → NAT (e.g., ).
192.168.80.164 - LAN → Host-only (e.g., ).
192.168.40.129
- External → NAT (e.g.,
-
ISO Issues:
- Verify the hash value of the Clear OS ISO if installation fails.
!5. Network Interfaces.png
Summary of Key Steps in Clear OS Interface
- Access Clear OS: .
https://<external_ip>:81 - Configure Gateway Mode → Set DNS (e.g., ).
8.8.8.8 - Select Community Edition → Proceed with environment and basic setup.
- Optionally add firewall rules to block VM1’s internet access.
Read Next
8/26/2026
[Day 5] 6. Message Authentication Code
### **Why is MAC Used?** Imagine you're sending a box of chocolates to a friend through a delivery service. Along with the box, you attach a unique...
8/26/2026
[Day 5] 7. Squid as a Load Balancer
### **Setup Overview** We are configuring **SQUID** to act as a load balancer for two **Apache Servers** on separate machines. #### **Network Co...