In this IT Pro Challenges hands-on lab, learners are introduced to skills required to configure a network that contains three virtual machines. Exercises in this lab teach users how to verify network address, DNS zone, IPv4, and IPv6. The topics covered in this lab are critical for learners to be effective in Forensics Analyst, Exploitation Analys...
Linux is based on the Linux kernel, and Ubuntu is based on the Linux system and is one of the distributions. In this hands-on lab, you will learn how to configure a network that contains one virtual machine running Windows 10 and two virtual machines running Ubuntu Linux. First, you will verify the network address settings on two Microsoft Azure virtual machines that run Ubuntu Linux. Next, you will create a secondary network interface, and then configure a custom DNS zone in Azure. Finally, you will configure IPv4 and IPv6 network addresses and routing on two computers that run Linux.
Understand the Scenario
In this lab, you will configure a network that contains one virtual machine running Windows 10 and two virtual machines running Ubuntu Linux. You will use a virtual machine named W10-Admin running Windows 10 and two virtual machines named Ubuntu1 and Ubuntu2 running Ubuntu Linux. A Microsoft Azure account has been created for you.
Verify the IP addresses of the Azure virtual machines
In this section of the lab, you will use various methods to verify the dynamically assigned public IP addresses of two Azure virtual machines that run Ubuntu Linux using Azure. Microsoft Azure is a cloud computing service for testing, deploying, building,and managing applications and services through Microsoft-managed data centers. First, in the Azure portal, on the Home page, in Azure services, you will select Virtual machines to locate the Public IP address, and then record it. Next, you will select the Virtual machines breadcrumb link and record the Linux2 Public IP address. Next, when connecting to a server by using SSH, you will see a PuTTY Security Alert message box indicating that the host computer may not be trusted. This is a security feature of SSH, and the message will not reappear with subsequent connections to the server from the same computer. Next, you will run a command to establish an SSH connection to Linux2, and then enter yes to accept host authenticity and run a "who" command to confirm the public IP address of Linux1. The who command displays the name or names of users currently signed in, as well as the user's remote host name or IP address. Finally, you will verify that the output of the who command displays the Linux1 public IP address of
Create a secondary network interface card on an Azure virtual machine
In this section, you will configure a secondary network interface card (NIC) and attach it to Linux1. Multiple NICs enable separation of traffic types across NICs. Creating a secondary NIC can be useful when one NIC communicates with the internet, while the other NIC communicates only with internal resources not connected to the internet. To accomplish this, first, in the Azure portal, you will select Virtual machines and then select the "Do you want to reserve the Public IP address?" checkbox to reserve the public IP address. To add a network interface to a virtual machine, you need to stop the virtual machine first. Next, you will wait for the virtual machine's status to change to Stopped before proceeding to the next step. Finally, the ifconfig command output displays the IP address of the Linux1 primary eth0 interface as well as the secondary interface eth1 that was added in the Azure portal.
Configure custom DNS settings in Azure
The domain name system (DNS) translates or resolves, a website or service name to its IP address. Azure DNS is a hosting service for DNS domains. It provides name resolution by using Microsoft Azure infrastructure. By default, Azure-provided DNS is enabled for all Azure virtual networks (VNets). DNS customization can enhance performance and provide more administrative control when hosting network services. First, in Linux1, run the nslookup command to query the Azure DNS nameserver. The Azure DNS default nameserver resolves DNS queries made by the virtual machines that are members of an Azure VNet — in this case, MyVNET. NsLookup is a network administration command-line tool used for querying DNS to obtain domain name or IP address mapping information. Next, you will run the exit command to close the Linux1 SSH session. The output of the nslookup command will confirm that Linux1 DNS queries are answered by the nameserver 188.8.131.52, as configured in the Azure DNS custom settings. Finally, you will run the exit command to close the SSH session.
Configure a DNS zone in Azure
In this section, you will configure a DNS zone, and DNS address (A) records to resolve hostnames in the Azure virtual network. First, in the Azure portal, on the portal menu, you will select __All resources then __select Linux1, locate the Private IP address, and then record it. Next, you will select the Virtual machines breadcrumb link, select Linux2, locate the Private IP address, and then record it. After this, in search of the Marketplace, you will enter the DNS zone and select Create. You will see a Validation passed notification when Azure has the information necessary to create the zone. Next, you will wait for the zone deployment to complete. DNS resolves the fully qualified computer names Linux1 and Linux2 to the IP addresses, respectively. This verifies that DNS zone configuration and DNS name resolution is working correctly.
Configure IPv4 and IPv6 IP addresses in Linux
In this section, you will configure static IPv4 and IPv6 IP addresses on Ubuntu1 and Ubuntu2. You have been automatically signed in to both computers as the root user. Internet Protocol Version 6 (IPv6) uses a 64-bit hexadecimal addressing format. IPv4 uses a 32-bit numeric addressing format. First, you will switch to Ubuntu1 and run the command to display the YAML network configuration file. The Ubuntu1 NICs, eth0, and eth1, are configured to acquire an IPv4 address automatically by using the Dynamic Host Control Protocol (DHCP). Next, you will open the YAML file by using the nano text editor. Nano is a text editor for UNIX-like computing systems or operating environments that uses a command-line interface. Finally, you will use netplan to commit the configuration changes. Netplan is a command-line utility used to configure networking on certain Linux distributions. Netplan uses YAML description files to configure network interfaces.
Configure a secondary IPv4 address on a network interface
In this section of the virtual lab, you will configure a secondary IP address on Ubuntu1, and then test connectivity to Ubuntu1 from Ubuntu2. In a single server environment that has one network interface, two unique IP addresses can provide additional IP address space, routing options, and DMZ separation. First, you will switch to Ubuntu1 to list all Ubuntu1 IP addresses. Next, you will add the secondary IPv4 address to the eth0 interface and then verify the addition of the secondary IPv4 address to eth0. Next, you will switch to Ubuntu2 and test connectivity to the secondary address by using the ping command. This ping will fail as the Ubuntu2 default gateway does not have routing information for the 184.108.40.206 subnet.
Configure routing in Linux
In this section, you will configure IPv4 and IPv6 routing on Ubuntu2. First, on Ubuntu2, you will open the YAML file by using the nano text editor to add gateway. The addition of a gateway4 and gateway6 statement in the YAML file configures a new default gateway for Ubuntu2 IPv4 and IPv6 traffic — in this case, the Ubuntu1 eth0 interface. Next, you will use netplan to commit the network configuration changes. Next, you will test the connectivity to the Ubuntu1 eth0 interface's secondary address using the ping command. Finally, you will verify IPv6 connectivity to the Ubuntu1 eth1 interface by using the ping6 command. The ping6 command is the IPv6 version of the IPv4 ping command. This command verifies IPv6 routing from Ubuntu2 to Ubuntu1.
Lab Summary Conclusion
After completing the "Linux+2" virtual lab, you will have accomplished the following:
- Verified network address settings on Linux virtual machines in Azure.
- Created a secondary network interface on a computer running Linux.
- Configured a custom DNS zone in Azure.
- Configured IPv4 and IPv6 network addresses in Linux.
- Configured routing on two computers that run Linux.
This CompTIA A+ training covers the 220-1001 exam components needed to earn the CompTIA A+ ...
Empower yourself as a security professional by gaining the fundamental knowledge for securing a network ...