Configuring the VM to Support an Endpoint

Prev Next

This article demonstrates some practical examples of configuring the software and services within a Linux or Windows virtual machine.

Configure an SSH Connection

Configuring a VM for an SSH connection varies depending on the operating system. Windows and Linux desktops typically don't have an SSH server installed by default.

Windows VMs

Linux VMs

  1. Install OpenSSH Server:

    Add-WindowsFeature -Name OpenSSH-Server

  2. Open port 22 in Windows Firewall:

    New-NetFirewallRule -Protocol TCP -LocalPort 22 -Direction Inbound -Action Allow -DisplayName "OpenSSH"

  3. Ensure the SSH service starts on boot:

    Set-Service -Name sshd -StartupType Automatic

  1. Install and start an OpenSSH Server:

    • CentOS/RHEL:

      yum install openssh-server -y && systemctl start ssh && systemctl enable ssh

    • Ubuntu:

      apt install openssh-server-y && systemctl start ssh && systemctl enable ssh

  2. Open port 22 in firewall:

    • CentOS/RHEL:

      firewall-cmd --add-service=ssh --permanent && firewall-cmd --reload

    • Ubunutu:

      ufw allow ssh && ufw reload

Configure an HTTP Connection

Configuring a VM for an HTTP connection varies depending on the operating system.

Windows VMs

Linux VMs

  1. Install IIS Web Server:

    Install-WindowsFeature -name Web-Server -IncludeManagementTools

  2. Start the IIS service:

    Start-Service W3SVC

  3. Open port 80 in Windows Firewall:

    New-NetFirewallRule -Protocol TCP -LocalPort 80 -Direction Inbound -Action Allow -DisplayName "HTTP"

  4. Place web content in C:\inetpub\wwwroot\

  1. Install and start an Apache web server:

    • CentOS/RHEL:

      yum install httpd -y && systemctl start httpd && systemctl enable httpd

    • Ubuntu:

      apt install apache2 -y && systemctl start apache2 && systemctl enable apache2

  2. Open port 80 in firewall:

    • CentOS/RHEL:

      firewall-cmd --add-service=http --permanent && firewall-cmd --reload

    • Ubunutu:

      ufw allow 80/tcp && ufw reload

  3. Place web content in /var/www/html/

Configure a Remote Desktop (RDP) Connection

RDP configuration is supported on both Windows and Linux VMs. Windows requires only basic configuration, while Linux requires additional software installation.

These instructions assume the Linux VM is running a distribution with a desktop environment already installed.

Windows VMs

Linux VMs

Step 1: Enable remote desktop

  1. Start the VM and log in.

  2. Open the Settings app and search for Remote Desktop settings.

  3. Turn on the Enable Remote Desktop option.

  4. Uncheck the Only allow connections from computers running Remote Desktop with Network Level Authentication (recommended) checkbox. Deselecting this option doesn’t pose a security risk, as the connection is limited to the internal Skillable network.

  1. Install and start xrdp:

    • CentOS/RHEL:

      yum install xrdp -y && systemctl start xrdp && systemctl enable xrdp

    • Ubuntu:

      apt install xrdp -y && systemctl start xrdp && systemctl enable xrdp

  2. Open port 80 in firewall:

    • CentOS/RHEL:

      firewall-cmd --add-port=3389 --permanent && firewall-cmd --reload

    • Ubunutu:

      ufw allow 3389/tcp && ufw reload

Step 2: Verify RDP access on the user account

To give a user RDP permissions, add them to the Remote Desktop Users group on the target machine using either the GUI or the CLI.

Using the GUI

  1. Navigate to Local Users and Groups:

    • Press Win + R, type lusrmgr.msc, and then press Enter.

    • In the left pane, select Groups.

  2. Add the user to the Remote Desktop Users group:

    • In the middle pane, double-click on Remote Desktop Users.

    • Click Add.

    • In the text field, enter the username of the user you want to add, then click OK.

Using the Command Line

Open the command prompt as an administrator:

  1. Press Win + X and select Command Prompt (Admin).

  2. Add the user to the Remote Desktop Users group, replacing [username] with the actual username:

    net localgroup "Remote Desktop Users" /add [username]

Using PowerShell

Open PowerShell as an administrator:

  1. Press Win + X and select Windows PowerShell (Admin).

  2. Add the user to the Remote Desktop Users group, replacing [username] with the actual username:

    Add-LocalGroupMember -Group "Remote Desktop Users" -Member [username]

Step 3: Verify RDP configuration

  1. In the terminal, verify the user has RDP rights by checking the user’s group membership:

    Get-LocalGroupMember -Group "Remote Desktop Users"

  2. Navigate to Settings > System > Remote Desktop and ensure the Enable Remote Desktop option is enabled.

Configure a Telnet Connection

Telnet connections are generally recommended for use with appliance-style devices that do not support SSH, such as routers and switches. Telnet can be configured on both Windows and Linux; however, only Linux includes native support for Telnet. For Windows, a third-party application must be installed, and each application would have its own configuration steps.