NDC & PKI

[Day 5] 5. Sharing Internet Access Between VMs Using Clear OS

D
DITISS Admin
••4 min read

Setup 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

  1. Create the VM:

    • Name the VM folder:
      ClearOS
      .
    • OS Type:
      Red Hat Enterprise 64-bit
      .
    • RAM: 4GB.
    • Storage: Default settings.
  2. Configure Network Adapters:

    • Adapter 1: Host-only (e.g.,
      VMNET4
      ) for communication with VM1.
    • Adapter 2: NAT for internet access.
  3. 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

  1. Access Clear OS Admin Interface:

    • Use a browser to access Clear OS:
      https://<external_ip>:81
      .
  2. Gateway Mode:

    • Configure Clear OS to operate in Gateway Mode.
    • Set the DNS Server to
      8.8.8.8
      (Google) or
      192.168.80.2
      .
  3. Community Edition:

    • Select Community Edition and proceed with setup.
  4. Environment Selection:

    • Choose Education as the environment.
  5. Marketplace Setup (Optional):

    • Skip installing additional packages for now.
  6. Domain Configuration:

    • Setting a domain is optional and can be skipped.

3. Enable Internet Access for VM1

  1. Start both VMs (VM1 and VM2).
  2. Ensure VM2 (Clear OS) is operational and both adapters are active:
    • Host-only Adapter: Communication with VM1.
    • NAT Adapter: Internet access.
  3. Test internet connectivity on VM1:
    • VM1 should now access the internet via Clear OS (VM2).

4. Block Internet Access for VM1

  1. Access Firewall Rules:

    • Use the Clear OS admin interface in the browser.
    • Identify VM1’s Host-only IP address.
  2. Create a Rule:

    • Add a firewall rule to deny internet access for VM1's IP.
  3. Test the Connection:

    • Attempt to access the internet on VM1.
    • Internet access should now be blocked.

Troubleshooting

  1. 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
        ).
  2. 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

  1. Access Clear OS:
    https://<external_ip>:81
    .
  2. Configure Gateway Mode → Set DNS (e.g.,
    8.8.8.8
    ).
  3. Select Community Edition → Proceed with environment and basic setup.
  4. 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...