You are on page 1of 162

CompTIA Network+

Network Services and Protocols - Part 3

Introduction
Lab Topology
Exercise 1 - Configuring Port 21 for FTP
Exercise 2 - Configuring Port 161 for SNMP
Exercise 3 - Configuring Port 23 for Telnet
Exercise 4 - Configuring Port 445 for SMB
Exercise 5 - Configuring Port 3389 for RDP
Exercise 6 - Using VNC and SSH
Review

Introduction
Welcome to the Network Services and Protocols (Part 3) Practice Lab. In this module, you will be provided with the
instruction and computer hardware to develop your hands-on skills in the defined topics.

network protocols
ports
FTP
SNMP
telnet
SMB
RDP
VNC
SSH

Learning Outcomes
In this module, you will complete the following exercises:

Exercise 1 - Configuring Port 21 for FTP


Exercise 2 - Configuring Port 161 for SNMP
Exercise 3 - Configuring Port 23 for Telnet
Exercise 4 - Configuring Port 445 for SMB
Exercise 5 - Configuring Port 3389 for RDP
Exercise 6 - Using VNC and SSH

After completing this lab, you will be able to:

Configure port 21 for FTP


Configure port 161 for SNMP
Configure port 23 for Telnet
Configure port 445 for SMB
Configure port 3389 for RDP
Configure VNC and SSH

Exam Objectives
N10-007 1.1: Explain the purposes and uses of ports and protocols (Protocols and ports, SSH 22)
N10-007 1.1: Explain the purposes and uses of ports and protocols (Protocols and ports, SNMP 161)
N10-007 1.1: Explain the purposes and uses of ports and protocols (Protocols and ports, FTP 20, 21)
N10-007 1.1: Explain the purposes and uses of ports and protocols (Protocols and ports, TELNET 23)
N10-007 1.1: Explain the purposes and uses of ports and protocols (Protocols and ports, RDP 3389)
N10-007 1.1: Explain the purposes and uses of ports and protocols (Protocols and ports, SMB 445)
N10-007 3.3: Explain common scanning, monitoring, and patching processes and summarize their expected output (SNMP
monitors, MIB)
N10-007 3.4: Given a scenario, use remote access methods (VPN, RDP)
N10-007 3.4: Given a scenario, use remote access methods (VPN, SSH)
N10-007 3.4: Given a scenario, use remote access methods (VPN, VNC)
N10-007 3.4: Given a scenario, use remote access methods (VPN, Telnet)
N10-007 3.4: Given a scenario, use remote access methods (Remote file access, FTP/FTPS)
N10-007 5.2: Given a scenario, use the appropriate tool (Command line, ifconfig)
N10-007 5.2: Given a scenario, use the appropriate tool (Command line, netstat)

Note: Our main focus is to cover the practical, hands-on aspects of the exam objectives. We recommend referring to course
material or a search engine to research theoretical topics in more detail.

Lab Duration
It will take approximately 1 hour to complete this lab.

Help and Support


For more information on using Practice Labs, please see our Help and Support page. You can also raise a technical support ticket
from this page.

Click Next to view the Lab topology used in this module.

Copyright © Practice Labs 2007 - 2018. All rights reserved.

Lab Topology
During your session, you will have access to the following lab configuration.
Figure 1 Lab Topology - The lab topology is composed of two subnets separated by an Ubuntu device called PLABRTR01
functioning as a router. The first subnet contains three computers. The first, called PLABDC01 is a Windows 2016 Server
with an IP address of 192.168.0.2/24 and functions as the Domain Controller. The second, called PLABSA01 is also a
Windows 2016 Server with an IP address of 192.168.0.3/24. The third, called PLABWIN10 is a Windows 10 device with an
IP address of 192.168.0.4/24. The PLABRTR01 device has an IP address of 192.168.0.1/24 on the interface that connects
to this subnet. The other interface connects to the second subnet with an IP address of 192.168.1.254/24. This second
subnet contains only one other device, the PLABWEB01 device which is also running Windows 2016 Server and has an IP
address of 192.168.1.1/24.

Depending on the exercises you may or may not use all of the devices, but they are shown here in the layout to get an overall
understanding of the topology of the lab.

PLABDC01 (Domain Controller - Windows Server 2016)


PLABSA01 (Member Server - Windows Server 2016)
PLABWIN10 (Workstation - Windows 10)
PLABRTR01 (Router - Linux Ubuntu)
PLABWEB01 (Web Server - Windows Server 2016)

Click Next to proceed to the first exercise.

Exercise 1 - Configuring Port 21 for FTP


File Transfer Protocol (FTP) is a standard network protocol used to transfer files from host (computer) to another host over a TCP-
based network like a private intranet or the Internet.

FTP is built on client-server computing model. It uses a separate data and control connections between a client (workstation) and
FTP server. FTP users may authenticate themselves in the form of a username and password which are transmitted as plain-text.
For this reason, most FTP sites allow anonymous as the username and an e-mail address as the password.

FTP uses two port numbers. Port 20 for Data and port 21 for Control. A server running FTP service listens on port 21 for FTP
sessions, by default.

To better understand this technology, also refer to your course material or use your preferred search engine to research this topic in
detail.

Learning Outcomes
After completing this exercise, you will be able to:

Configure port 21 for FTP

Your Devices
You will be using the following devices in this lab. Please power these on now.

PLABSA01 (Member Server - Windows Server 2016)


PLABWIN10 (Workstation - Windows 10)

Task 1 - Install Web Server (IIS) Role

In this task, you will confirm that while installing web server (IIS) role on a server, port 21 is configured for FTP, by default.

To install web server (IIS) role, perform the following steps:

Step 1
Ensure you have powered on the required devices defined in the introduction. Connect to the PLABSA01 device.

On the Server Manager interface, click Add roles and features.


Figure 1.1 Screenshot of the PLABSA01 desktop: Server Manager console is displayed showing the Add roles and features
link highlighted.

Step 2
The Add Roles Wizard is displayed. On the Before You Begin page, read the information and click Next.
Figure 1.2 Screenshot of the PLABSA01 desktop: Before you begin page on the Add Roles and Features Wizard is
displayed showing the Next button highlighted.

Step 3
On the Select installation type page, click Next.
Figure 1.3 Screenshot of the PLABSA01 desktop: Select installation type page on the Add Roles and Features Wizard is
displayed showing default selection and the Next button available.

Step 4
On the Select destination server page, click Next.
Figure 1.4 Screenshot of the PLABSA01 desktop: Select destination server page on the Add Roles and Features Wizard is
displayed showing default settings and the Next button highlighted.

Step 5
On the Select Server Roles page, select Web Server (IIS) from the Roles list. When the Add features that are required
for Web Server (IIS) box appears, click Add Features.
Figure 1.5 Screenshot of the PLABSA01 desktop: Add features that are required for Web Server (IIS) box on the Add Roles
and Features Wizard is displayed showing default settings and the Add Features button highlighted.

Step 6
On the Select server roles page, click Next.
Figure 1.6 Screenshot of the PLABSA01 desktop: Select server roles page on the Add Roles and Features Wizard is
displayed showing the required settings performed, and the Next button highlighted.

Step 7
On the Select features page, click Next.
Figure 1.7 Screenshot of the PLABSA01 desktop: Select features page on the Add Roles and Features Wizard is displayed
showing the default settings and the Next button highlighted.

Step 8
On the Web Server Role (IIS) page, click Next.
Figure 1.8 Screenshot of the PLABSA01 desktop: Web Server Role (IIS) page on the Add Roles and Features Wizard is
displayed showing the Next button highlighted.

Step 9
On the Select Role Services page, keep the default selections. Scroll down to select the FTP Server option at the bottom of the
list.

Select the FTP Server option. Make sure that both the FTP service and the FTP Extensibility sub-options are selected as well.

Sub-options for the individual roles are given to enable you to select individual server roles if required.

Click Next.
Figure 1.9 Screenshot of the PLABSA01 desktop: Select role services page on the Add Roles and Features Wizard is
displayed showing the required selections performed and the Next button highlighted.

Step 10
On the Confirm Installation Selections page, check the specifications for installation and click Install.
Figure 1.10 Screenshot of the PLABSA01 desktop: Confirm installation selections page on the Add Roles, and Features
Wizard is displayed listing specifications to install the role and the Install button available.

Step 11
The Installation Progress page displays the progress of installation of the Web Server (IIS) role.
Figure 1.11 Screenshot of the PLABSA01 desktop: Installation progress page on the Add Roles and Features Wizard is
displayed tracking installation of the role.

Step 12
Once the installation is complete, click Close.
Figure 1.12 Screenshot of the PLABSA01 desktop: Installation progress page on the Add Roles and Features Wizard is
displayed showing installation status, and the Close button highlighted.

Task 2 - Setup an FTP Site

To enable an FTP session, first, you must have a server configured as an FTP server. This process is also known as setting up an FTP
site.

To setup an FTP site, perform the following steps:

Step 1
On the PLABSA01 device, click Start and find the Windows Administrative Tools folder. Click on it and find the Internet
Information Services (IIS) Manager. Click on this item.
Figure 1.13 Screenshot of the PLABSA01 desktop: Start > Windows Administrative Tools > Internet Information Services
(IIS) Manager menu-options are highlighted on the PLABSA01 Windows desktop.

Step 2
The Internet Information Services (IIS) Manager window is displayed. You may want to maximize this window for ease of
use.
Figure 1.14 Screenshot of the PLABSA01 desktop: Internet Information Services 10 window is displayed on the Internet
Information Services (IIS) Manager.

Step 3
Expand the PLABSA01 (PLABSA01\Administrator) option from the console tree under Connections pane on the left.
Figure 1.15 Screenshot of the PLABSA01 desktop: Internet Information Services (IIS) Manager window is displayed
showing the required selections performed on the navigation pane at the left.

Step 4
Right-click Sites and select the Add FTP Site option.
Figure 1.16 Screenshot of the PLABSA01 desktop: Context menu (that appears on right-clicking the Sites option) > Add
FTP Site menu-options are displayed on the Internet Information Services (IIS) Manager window.

Step 5
The Add FTP Site wizard is displayed.

On the Site Information page, specify the following information:

FTP site name: plabsftp


Physical path: C:\Inetpub\ftproot

Click Next.
Figure 1.17 Screenshot of the PLABSA01 desktop: Site Information page on the Add FTP Site wizard is displayed showing
the required values typed-in, and the Next button highlighted.

Step 6
On the Bindings and SSL Settings page, go to SSL section and select No SSL.

Notice that the default port assigned for FTP is port 21. Click Next.
Figure 1.18 Screenshot of the PLABSA01 desktop: Binding and SSL Settings page on the Add FTP Site wizard is displayed
showing the required settings performed and the Next button highlighted.

Step 7
On the Authentication and Authorization Information page, use these settings:

Authentication: Enable the Anonymous and Basic check boxes.


Authorization: Allow access to All Users
Permissions: Enable Read and Write check boxes.

Click Finish.
Figure 1.19 Screenshot of the PLABSA01 desktop: Authentication and Authorization Information page on the Add FTP
Site wizard is displayed showing the required settings performed and the Finish button highlighted.

Step 8
On the Internet Information Services (IIS) Manager window, click Sites item.

Find plabsftp is listed as an FTP site. In addition, notice that under the Bindings column, port 21 is listed for FTP.

Minimize IIS Manager.


Figure 1.20 Screenshot of the PLABSA01 desktop: Internet Information Services (IIS) Manager window is displayed
listing the newly added ftp site.

Step 9
Launch the File Explorer from the taskbar.
Figure 1.21 Screenshot of the PLABSA01 desktop: File Explorer icon on the taskbar is highlighted on the PLABSA01
Windows desktop.

Step 10
Expand This PC. Navigate to Local Disk C > inetpub > ftproot folder.

Right-click on details pane and choose New > Text Document.


Figure 1.22 Screenshot of the PLABSA01 desktop: Context menu (that appears on right-clicking the details pane) > New >
Text Document menu-options are highlighted on the ftproot window.

Step 11
Rename the text document as memo.
Figure 1.23 Screenshot of the PLABSA01 desktop: The newly created text document is listed on the ftproot window.

Step 12
Click the Reboot button under the PLABSA01 device in the Practice Labs application.

The Device will reboot.

Note: After installing FTP service on Windows Server 2016 R2, the machine needs to be restarted to fix an FTP connection
issue.

Wait for a couple of minutes before reconnecting to the PLABSA01 device to give it enough time to restart its services.

Task 3 - Verify FTP access from PLABWIN10

In this task, you will attempt to access the FTP site from the Windows 10 workstation.

Step 1
Connect to PLABWIN10 device.

Click Start and in Search programs and files box, type:


cmd

Press Enter.

Figure 1.24 Screenshot of the PLABWIN10 desktop: PLABWIN10 Windows desktop is displayed showing the required
search key is typed in the Search programs and files text box.

Step 2
Type the following commands to access FTP server:

ftp
open PLABSA01
anonymous

Passw0rd
The screen shows that the FTP user anonymous is now signed in.
Figure 1.25 Screenshot of the PLABWIN10 desktop: Administrator Command Prompt - ftp window is displayed showing
the command to access ftp server typed-in and system response to the command.

Step 3
To see the contents of ftp directory, type:

ls

Press Enter. Notice that the text file you created is listed.
Figure 1.26 Screenshot of the PLABWIN10 desktop: Administrator Command Prompt - ftp window is displayed showing
the command to list the contents of the ftp directory typed-in and system response to the command.

Step 4
To download the file, type:

get memo.txt

Press Enter.
Figure 1.27 Screenshot of the PLABWIN10 desktop: Administrator Command Prompt - ftp window is displayed showing
the command to download the required file typed-in.

Step 5
The system indicates that a successful transfer occurred.
Figure 1.28 Screenshot of the PLABWIN10 desktop: Administrator Command Prompt - ftp window is displayed showing
system response to the command typed-in in the previous step.

Step 6
To log out of the FTP server, type:

bye

Press Enter.

Close command prompt window.


Figure 1.29 Screenshot of the PLABWIN10 desktop: Administrator Command Prompt window is displayed showing the
command to exit ftp typed-in and system response to the command.

Leave the devices you have powered on in their current state and proceed to the next exercise.

Exercise 2 - Configuring Port 161 for SNMP


Simple Network Management Protocol (SNMP) is a network protocol for managing devices on a TCP/IP network. Devices that
support SNMP include servers, workstations, routers, switches, printers and much more. SNMP is often used in network
management systems to monitor network-attached devices for conditions that call for administrative attention-for example the
administrator can be alerted if the router fails or be alerted when disk space on a server is running out.

SNMP-managed devices also called “agents,” listen on UDP port 161 for SNMP requests which are forwarded to an SNMP
management station that runs proprietary software for interpreting the data received from agents.

To better understand this technology, also refer to your course material or use your preferred search engine to research this topic in
detail.

Learning Outcomes
After completing this exercise, you will be able to:
Configure port 161 for SNMP

Your Devices
You will be using the following devices in this lab.

PLABWIN10 (Workstation - Windows 10)

Task 1 - Install SNMP agent

In this task, you will configure SNMP on a Windows 10 device. To configure SNMP, you must first activate the feature. To activate
and configure SNMP, perform the following steps.

Step 1
From PLABWIN10 device, click Start and begin typing Control Panel. The Control Panel app will appear in the menu. Click
on it.
Figure 2.1 Screenshot of the PLABWIN10 desktop: Control Panel menu-option is highlighted on the Start menu.

Step 2
From the Control Panel, access the Programs option.
Figure 2.2 Screenshot of the PLABWIN10 desktop: Programs link is highlighted on the Control Panel window.

Step 3
On the Programs window, select the Turn Windows features on or off option under the Programs and Features heading.
Figure 2.3 Screenshot of the PLABWIN10 desktop: Turn Windows features on or off link is highlighted on the Programs
window.

Step 4
The Windows Features dialog box appears.

Scroll down the list of programs and expand the Simple Network Management Protocol (SNMP) option from the list.
Figure 2.4 Screenshot of the PLABWIN10 desktop: Required node is expanded on the Windows Features dialog box.

Step 5
Select both the Simple Network Management Protocol (SNMP) option and the WMI SNMP Provider. Click OK.
Figure 2.5 Screenshot of the PLABWIN10 desktop: Required features are selected, and the OK button highlighted on the
Windows Features dialog box.

Step 6
Windows Features dialog box appears confirming that Windows is configuring the selected service on the machine.
Figure 2.6 Screenshot of the PLABWIN10 desktop: Windows Features track box is displayed tracking configuration of
selected services.

Step 7
Once the configuration is complete, the Windows Features dialog box indicates that the changes have been successfully
completed. Click Close.

Alert: You may also see the message ‘Windows needs to reboot your PC to finish installing the requested changes. If this
appears, click Restart now.
Figure 2.7 Screenshot of the PLABWIN10 desktop: Windows Features dialog box is displayed the listing status of the
configuration and the Close button highlighted.

Step 8
Close the Programs window to reach the desktop.
Figure 2.8 Screenshot of the PLABWIN10 desktop: Programs window is displayed showing the close icon available at the
top-right corner.

Task 2 - Configure SNMP Properties

After installing and configuring SNMP, you need to configure properties that specify the hosts and the networks to listen for.

In this task, you will configure the host and network specifications for an SNMP agent on the Windows 10 device.

To configure SNMP properties, perform the following steps:

Step 1
In PLABWIN10, click Start, and start typing Computer Management. When the Computer Management app appears,
click it.
Figure 2.9 Screenshot of the PLABWIN10 desktop: Computer Management menu-option is highlighted on the Start
menu.

Step 2
The Computer Management window is displayed.

Expand the Services and Applications option under Computer Management (Local) in the left pane. Select Services.
Figure 2.10 Screenshot of the PLABWIN10 desktop: Computer Management window is displayed showing required
settings performed on the navigation pane at the left.

Step 3
On the Services pane, scroll down the list and locate SNMP Service.

Right-click on SNMP Service and select Properties.


Figure 2.11 Screenshot of the PLABWIN10 desktop: Context menu (that appears on right-clicking a listed service) >
Properties menu-options are highlighted on the Computer Management window.

Make sure you do not accidentally click on the SNMP Trap service.

Step 4
The SNMP Service Properties (Local Computer) dialog box appears.

On the Agent tab, add the following information:

Contact: Admin
Location: London, UK

Keep the other default selections.

Click Apply then go to Security tab.


Figure 2.12 Screenshot of the PLABWIN10 desktop: Agent tab on the SNMP Service Properties (Local Computer) dialog
box is displayed showing the required settings performed and the Apply button and the Security tab available.

Step 5
On the Security tab, click Add in the Accepted community names panel.
Figure 2.13 Screenshot of the PLABWIN10 desktop: Security tab on the SNMP Service Properties (Local Computer) dialog
box is displayed showing the Add button highlighted.

Step 6
The SNMP Service Configuration dialog box appears.

Add the Community Name as ROC. Keep the Community rights as READ ONLY.

Click Add.
Figure 2.14 Screenshot of the PLABWIN10 desktop: SNMP Service Configuration dialog box is displayed showing the
required settings performed, and the Add button highlighted.

Step 7
You are navigated back to the SNMP Service Properties (Local Computer) dialog box.

Notice that ROC appears as an accepted community name, with the READ ONLY rights.

Click Add on the Accept SNMP packets from these hosts radio button-panel.
Figure 2.15 Screenshot of the PLABWIN10 desktop: Security tab on the SNMP Service Properties (Local Computer) dialog
box is displayed listing the newly added community name and the Add button in the other section available.

Step 8
The SNMP Service Configuration dialog box appears.

Type the IP address:

192.168.0.3

Click Add.
Figure 2.16 Screenshot of the PLABWIN10 desktop: SNMP Service Configuration dialog box is displayed showing the
required value typed-in, and the Add button highlighted.

Step 9
You are navigated back to the SNMP Service Properties (Local Computer) dialog box.

Notice that 192.168.0.3 appears in the Accept SNMP packets from these hosts panel.

Click Apply and then click OK.


Figure 2.17 Screenshot of the PLABWIN10 desktop: Security tab on the SNMP Service Properties (Local Computer) dialog
box is displayed listing the newly added packet host and the Apply and OK buttons available.

Step 10
The SNMP service is now activated on your machine. The SNMP agent receives requests on port 161, by default.

An SNMP Management software is required. This will act as the administrator console for monitoring the status of different devices
that have the SNMP agent installed.

Minimize the Computer Management window.


Figure 2.18 Screenshot of the PLABWIN10 desktop: Computer Management window is displayed listing the newly
configured service.

Leave the devices you have powered on in their current state and proceed to the next exercise.

Exercise 3 - Configuring Port 23 for Telnet


Telnet is an application protocol that enables text-based communication between devices on a network. Telnet offers a user-
interface that makes it easy to perform remote configuration and maintain various devices on the network. Telnet supports devices
on WANs (such as the Internet) as well as on LANs (within an enterprise network). By default, the Telnet servers listen for
incoming connection requests on port 23.

Alert: In this exercise, you will be accessing a Linux device. If you are accessing the labs using the Java client, you will not be
able to connect to the device directly. It is recommended that you use the HTML client to complete this exercise, as the content
has been written using this client. For more information on how to do this, please see our help and support page,

To better understand this technology, also refer to your course material or use your preferred search engine to research this topic in
detail.

Learning Outcomes
After completing this exercise, you will be able to:

Configure port 23 for Telnet

Your Devices
You will be using the following devices in this lab. Please power these on now.

PLABWIN10 (Workstation - Windows 10)


PLABRTR01 (Router - Linux Ubuntu)

Task 1 - Install Telnet Client in PLABWIN10

In this task, you will configure telnet client on the Windows 10 device. To configure Telnet on the Windows 10 device, you must first
activate this feature.

To activate and configure Telnet, perform the following steps:

Step 1
From PLABWIN10 device, click Start and start typing Control Panel. Once the Control Panel app appears on the menu, click
it.
Figure 3.1 Screenshot of the PLABWIN10 desktop: Control Panel menu-option is highlighted on the Start menu.

Step 2
From the Control Panel window, select Programs.

Figure 3.2 Screenshot of the PLABWIN10 desktop: Programs link is highlighted on the Control Panel window.

Step 3
On the Programs window, select the Turn Windows features on or off option under the Programs and Features section.
Figure 3.3 Screenshot of the PLABWIN10 desktop: Turn Windows features on or off link is highlighted on the Programs
window.

Step 4
The Windows Features dialog box appears.

Scroll down to check Telnet Client box and click OK.


Figure 3.4 Screenshot of the PLABWIN10 desktop: Required role is selected on the Windows Features dialog box, and the
OK button highlighted.

Step 5
A Windows Features dialog box appears confirming that Windows is configuring the selected service on the machine.
Figure 3.5 Screenshot of the PLABWIN10 desktop: Windows Features dialog box is displayed tracking configuration of
selected service.

Step 6
Once the configuration is complete, the Windows Features window will indicate this. Click Close.
Figure 3.6 Screenshot of the PLABWIN10 desktop: Windows Features dialog box is displayed confirming configuration of
the selected service.

Step 7
After telnet client is installed, you are navigated back to the Programs window. Close the window to return to the desktop.
Figure 3.7 Screenshot of the PLABWIN10 desktop: Programs window is displayed on the PLABWIN10 Windows desktop.

Task 2 - Install Telnet Server on PLABRTR01

In this task, you will install the Telnet Server on the Ubuntu Linux device named PLABRTR01 to allow it to be remotely
administered with a command line interface from PLABWIN10 via Telnet.

Note that the Ubuntu Linux device is the one labeled as PLABRTR01. Its primary purpose in the labs is to function as a
router, however, in this lab, it will also function as a Telnet server.

Step 1
Connect to the desktop of the PLABRTR01 device. Press Enter at the lock screen, click on the Admin icon and enter the
following password:

Passw0rd
Press Enter again to continue.
Figure 3.8 Screenshot of the PLABRTR01 desktop: Login screen is displayed with the required password typed-in.

Step 2
Click on the Terminal icon on the left to open a terminal window.
Figure 3.9 Screenshot of the PLABRTR01 desktop: the Terminal icon is highlighted on the PLABRTR01 Windows
desktop.

Step 3
In the terminal window, type the following command to install the Telnet server on this device:

sudo apt-get install xinetd telnetd

When prompted enter the following password and press Enter.

Passw0rd
Figure 3.10 Screenshot of the PLABRTR01 desktop: administrator@PLABRTR01 window is displayed showing the
command to install the Telnet server typed-in and system response to the command.

Step 4
At some point during the installation process, you may be asked if you want to continue. Type Y and press Enter.
Figure 3.11 Screenshot of the PLABRTR01 desktop: administrator@PLABRTR01 window is displayed prompting for
confirmation to continue with the specified installation.

Step 5
As the installation process continues, you are informed of the actions being taken. Once it is complete, you will be presented with a
command prompt once again.
Figure 3.12 Screenshot of the PLABRTR01 desktop: administrator@PLABRTR01 window is displayed showing the
command prompt after completion of the specified activity.

Step 6
You may want to type the command clear in order to remove the previous commands and output from the terminal
window.

The Telnet server has been successfully installed. To make sure that it is running, you can reload the service by entering the
following command:

sudo /etc/init.d/xinetd restart

If prompted for the password, type the following and press Enter.

Passw0rd
Figure 3.13 Screenshot of the PLABRTR01 desktop: administrator@PLABRTR01 window is displayed showing the
command to reload the service typed-in and system response to the command.

Task 3 - Use Telnet Client to remote administer PLABRTR01

To verify that Telnet client is running on the Windows 10 device, perform the following steps:

Step 1
Connect once again to the PLABWIN10 device. Click Start and type cmd and press Enter to open a command line interface
window.
Figure 3.14 Screenshot of the PLABWIN10 desktop: Command Prompt menu-option is highlighted on the Start menu.

Step 2
To start a Telnet session with PLABRTR01, type:

telnet plabrtr01 23

Press Enter. Telnet servers listen on TCP port 23 for incoming connections.
Figure 3.15 Screenshot of the PLABWIN10 desktop: Administrator Command Prompt window is displayed showing the
command to start a Telnet session with a specified server typed-in.

Step 3
The Ubuntu Telnet prompt is displayed, and you are asked for login information. Type administrator at the login prompt and
press Enter.

Remember that you are connecting to a Linux server and unlike Windows, the username is case sensitive.
Figure 3.16 Screenshot of the PLABWIN10 desktop: Telnet plabrtr01 window is displayed showing the relevant login
information typed-in.

Step 4
You will then be prompted for the password. Enter the following password and press Enter.

Passw0rd
Figure 3.17 Screenshot of the PLABWIN10 desktop: Telnet plabrtr01 window is displayed showing the relevant login
information typed-in.

Note that if you take longer than 60 seconds to input username and password information, the system will close the
connection.

Step 5
Once you have successfully logged in, you are given information about the Telnet server including documentation and support
information from the developer. You are then provided with a prompt identical to that provided by the terminal window on the
PLABRTR01 device.

You may see an error message indicating a failure to connect to a Ubuntu resource. You can safely ignore this message.
Figure 3.18 Screenshot of the PLABWIN10 desktop: Telnet plabrtr01 window is displayed showing the PLABRTR01
terminal window prompt.

Step 6
From this command prompt, you are able to initiate any commands that you would if you were connected to a Terminal window on
the desktop of the device.

Type the following command and see the results in the output.

ifconfig

The network card information of the PLABRTR01 device is displayed. Try typing the same command on the Terminal window on
the desktop of the device and compare the output. The output is exactly the same.
Figure 3.19 Screenshot of the PLABWIN10 desktop: Telnet plabrtr01 window is displayed showing the ifconfig command
typed-in and system response to the command.

Step 7
To log out of the Telnet session, type exit. The session exits and you are once again given the command prompt of the local
computer. Close the command prompt window.
Figure 3.20 Screenshot of the PLABWIN10 desktop: Telnet plabrtr01 window is displayed showing the command to exit
the telnet session typed-in and system response to the command.

Leave the devices you have powered on in their current state and proceed to the next exercise.

Exercise 4 - Configuring Port 445 for SMB


Server Message Block (SMB) is a file and print sharing protocol that allows applications on a computer to read and write to files and
to request services from servers in a computer network. When using the SMB protocol, an application (or the user of an application)
can access folders, files, printers and other resources at a remote server. SMB uses TCP port 445 by default.

To better understand this technology, also refer to your course material or use your preferred search engine to research this topic in
detail.

Learning Outcomes
After completing this exercise, you will be able to:

Configure port 445 for SMB

Your Devices
You will be using the following devices in this lab.

PLABDC01 (Domain Controller - Windows Server 2016)


PLABWIN10 (Workstation - Windows 10)

Task 1 - Share a Folder from PLABDC01

In this task, you will share a folder using SMB on a Windows Server 2016 device.

To share a folder using SMB on the PLABDC01 device, perform the following steps:

Step 1
On the PLABDC01, minimize the Server Manager if it is still open, then click the File Explorer on the taskbar.

Figure 4.1 Screenshot of the PLABDC01 desktop: File Explorer icon on the taskbar is highlighted on the PLABDC01
Windows desktop.
Step 2
Navigate to the Local Disk C and create a folder called CompanyData.

Figure 4.2 Screenshot of the PLABDC01 desktop: Local Disk (C drive) window is displayed listing the newly created
folder.

Step 3
Right-click CompanyData and select Properties.
Figure 4.3 Screenshot of the PLABDC01 desktop: Context menu (that appears on right-clicking a folder) > Properties
menu-options are displayed on the Local Disk (C drive) window.

Step 4
The CompanyData Properties dialog box appears.

On the Sharing tab of the dialog box, click the Advanced Sharing button on the Advanced Sharing panel.
Figure 4.4 Screenshot of the PLABDC01 desktop: Sharing tab on the CompanyData Properties dialog box is displayed
showing the Advanced Sharing button highlighted.

Step 5
On the Advanced Sharing dialog box, check the Share this folder checkbox.

Notice that CompanyData appears as the name of the folder to share.

Keep the other default values and click Permissions.


Figure 4.5 Screenshot of the PLABDC01 desktop: Advanced Sharing dialog box is displayed showing the required settings
performed and the Permissions button highlighted.

Step 6
On the Permissions for CompanyData dialog box, review the default settings. Keep these settings and click OK.
Figure 4.6 Screenshot of the PLABDC01 desktop: Permissions for CompanyData dialog box is displayed showing default
settings, and the OK button highlighted.

Step 7
On the Advanced Sharing dialog box, click OK to save the changes.
Figure 4.7 Screenshot of the PLABDC01 desktop: Advanced Sharing dialog box is displayed showing the OK button
highlighted.

Step 8
On the CompanyData Properties dialog box, notice that the sharing status of the CompanyData folder is now changed to
Shared.

Close the dialog box.


Figure 4.8 Screenshot of the PLABDC01 desktop: Sharing tab on the CompanyData Properties dialog box is displayed
showing the updated sharing status of the folder and the Close button highlighted.

Task 2 - Authenticate the SMB Share

In this task, you will authenticate your connection to the SMB share.

To authenticate an SMB share, perform the following steps:

Step 1
Connect to the PLABWIN10 device. Launch the File Explorer from the taskbar.
Figure 4.9 Screenshot of the PLABWIN10 desktop: File Explorer icon on the taskbar is highlighted on the PLABWIN10
Windows desktop.

Step 2
Right-click on This PC and choose Map Network Drive…
Figure 4.10 Screenshot of the PLABWIN10 desktop: Context menu (that appears on right-clicking This Computer option)
> Map network drive menu-options are displayed in the Explorer Window.

Step 3
In the Folder box, type:

\\plabdc01\companydata

Keep the default selection of Z: as the drive letter and of Reconnect at sign-in. In addition, check Connect using different
credentials and click Finish.

Notice that the folder name is not case sensitive.


Figure 4.11 Screenshot of the PLABWIN10 desktop: Map Network Drive dialog box is displayed showing the required
settings performed, and the Finish button highlighted.

Step 4
The Windows Security dialog box is displayed. Use the following credentials:

User name: Administrator

Password: Passw0rd

Click OK.
Figure 4.12 Screenshot of the PLABWIN10 desktop: Windows Security dialog box is displayed showing the relevant login
credentials typed-in, and the OK button highlighted

Step 5
The companydata (\\plabdc01)(Z:) window appears.

SMB is now setup and functioning on the device, and it uses authentication to add security. SMB uses port 445 by default.

Close the companydata (\\plabdc01)(Z:) window.


Figure 4.13 Screenshot of the PLABWIN10 desktop: companydata (\\plabdc01) (Z drive) window is displayed on the
PLABWIN10 Windows desktop.

Step 6
Notice that a new Network Location item has appeared under the This PC selection in the File Explorer. The folder that you
created in the PLABDC01 device is being perceived by the PLABWIN10 device as a network drive with the drive letter Z: Any
files placed in this drive will appear in the folder on PLABDC01. Close the File Explorer window.
Figure 4.14 Screenshot of the PLABWIN10 desktop: Explorer window is displayed on the PLABWIN10 Windows desktop.

Leave the devices you have powered on in their current state and proceed to the next exercise.

Exercise 5 - Configuring Port 3389 for RDP


Remote Desktop Protocol (RDP) is a client-server based protocol that provides a user with a graphical user interface (GUI) to
connect to another computer over a network connection. RDP is designed for secure communications between Windows Terminal
Services Client and Windows Terminal Services Server. This protocol supports devices connected to the whole range of network
sizes - from a WAN (such as over the Internet) on one end to a LAN (within an enterprise network) on the other. RDP uses port
3389 by default.

To better understand this technology, also refer to your course material or use your preferred search engine to research this topic in
detail.

Learning Outcomes
After completing this exercise, you will be able to:

Configure port 3389 for RDP


Your Devices
You will be using the following devices in this lab.

PLABSA01 (Member Server - Windows Server 2016)


PLABWIN10 (Workstation - Windows 10)

Task 1 - Configure Remote Desktop Protocol properties

In this task, you will configure an RDP connection on a Windows 2016 server.

To configure the RDP connection, perform the following steps:

Step 1
Connect to the PLABSA01 device. Minimize the Server Manager if it is still open.

Open the File Explorer from the Taskbar.


Figure 5.1 Screenshot of the PLABSA01 desktop: File Explorer icon on the taskbar is highlighted on the PLABSA01
Windows desktop.

Step 2
Right click on This PC and click Properties.
Figure 5.2 Screenshot of the PLABSA01 desktop: Context menu (that appears on right-clicking This PC option) >
Properties menu-options are displayed in the explorer window.

Step 3
On the System window, select Remote settings option on the left side.
Figure 5.3 Screenshot of the PLABSA01 desktop: System window is displayed showing the Remote settings link on the
navigation pane at the left highlighted.

Step 4
The System Properties dialog box is displayed.

Select Allow connections only from computer running Remote Desktop with Network Level Authentication
(recommended) on the Remote Desktop panel.

Click Select Users.


Figure 5.4 Screenshot of the PLABSA01 desktop: System Properties dialog box is displayed showing the required settings
performed, and the Select Users button highlighted.

Step 5
On the Remote Desktop Users dialog box, click Add.
Figure 5.5 Screenshot of the PLABSA01 desktop: Remote Desktop Users dialog box is displayed showing the Add button
highlighted.

Step 6
On the Select Users dialog box, type everyone in the Enter the object names to select text box. Click Check Names.

Note: Just for this lab example, you allowed everyone to sign on to PLABSA01 via RDP. In a production environment,
you should limit the users that have access to RDP on specific devices.
Figure 5.6 Screenshot of the PLABSA01 desktop: Select Users dialog box is displayed showing the required value typed-in
and the Check Names button available.

Step 7
Clicking Check Names, validates the name of the object and gives it the complete path reference.

Click OK.
Figure 5.7 Screenshot of the PLABSA01 desktop: Select Users dialog box is displayed showing the specified object
validated and the OK button highlighted.

Step 8
You are brought back to the Remote Desktop Users dialog box.

Click OK twice.

Close the System and File Explorer windows.


Figure 5.8 Screenshot of the PLABSA01 desktop: Remote Desktop Users dialog box is displayed listing the newly added
users, and the OK button highlighted.

Step 9
Click Start and begin to type Computer Management. When the Computer Management app appears in the menu, click it.
Figure 5.9 Screenshot of the PLABSA01 desktop: Computer Management menu-option is highlighted on the Start menu.

Step 10
Expand Local Users and Groups and click Users.

Right-click on Guest and choose Set password….

Note: The Guest user account has a blank password by default.


Figure 5.10 Screenshot of the PLABSA01 desktop: Context menu (that appears on right-clicking a listed user-name) > Set
Password menu-options are displayed in the Computer Management window.

Step 11
Click Proceed when warned about making this password change.
Figure 5.11 Screenshot of the PLABSA01 desktop: Set Password for Guest caution box is displayed cautioning about
resetting the password, and the Proceed button highlighted.

Step 12
Type the following in the New password and Confirm password boxes:

Passw0rd
Click OK.
Figure 5.12 Screenshot of the PLABSA01 desktop: Set Password for Guest dialog box is displayed showing the required
values typed-in, and the OK button highlighted.

Step 13
You are informed that the password has been set. Click OK.
Figure 5.13 Screenshot of the PLABSA01 desktop: Local Users and Groups information box is displayed confirming that
the password is set and the OK button highlighted.

Step 14
You need to enable the Guest account, so it can be used for logging in.

Right-click on Guest and choose Properties.


Figure 5.14 Screenshot of the PLABSA01 desktop: Context menu (that appears on right-clicking a listed user-name) >
Properties menu-options are displayed in the Computer Management window.

Step 15
From Guest Properties dialogue box in the General tab, clear Account is disabled.

Click OK.

Close the Computer Management window.


Figure 5.15 Screenshot of the PLABSA01 desktop: General tab on the Guest Properties dialog box is displayed showing the
required settings performed and the OK button highlighted.

Task 2 - Setup an RDP Connection

To setup an RDP connection from PLABWIN10, perform the following steps:

Step 1
Connect to PLABWIN10. Click Start and begin to type Remote Desktop Connection. When the Remote Desktop
Connection app appears in the menu, click it.
Figure 5.16 Screenshot of the PLABWIN10 desktop: Remote Desktop Connection menu-option is highlighted on the Start
menu.

Step 2
Remote Desktop Connection dialog box is displayed.

Type plabsa01 in the Computer text box and click the Show Options down arrow.
Figure 5.17 Screenshot of the PLABWIN10 desktop: Remote Desktop Connection dialog box is displayed showing the
relevant login credentials typed-in, and the Show Options button highlighted.

Step 3
In the Logon settings panel, type guest as the User name and click the Allow me to save credentials checkbox.

Click Connect.
Figure 5.18 Screenshot of the PLABWIN10 desktop: General tab on the Remote Desktop Connection dialog box is
displayed showing the relevant settings performed, and the Connect button highlighted.

Step 4
For the password, type:

Passw0rd
Press Enter.
Figure 5.19 Screenshot of the PLABWIN10 desktop: Windows Security dialog box is displayed showing the relevant login
credentials typed-in.

Step 5
You get a message that the identity of the remote computer could not be identified. Click Yes to continue.
Figure 5.20 Screenshot of the PLABWIN10 desktop: Remote Desktop Connection caution box is displayed cautioning
about the identity of the remote computer not verified and the Yes button available.

Step 6
Wait several seconds while Remote Desktop Connection displays the progress of the connection.

Note: It may take over a minute for the connection to be fully established. During this time you may see a black screen.
Please be patient.

Once the connection is established, the PLABSA01 remote desktop is displayed.

Note: The desktop of the PLABSA01 device that you connect to remotely will not be the same as that seen on the desktop of
the PLABSA01. Because you have logged in with a different username, a new instance of a desktop is created with its own
background, icons, and selections.
Figure 5.21 Screenshot of the PLABSA01 virtual desktop: plabsa01 remote desktop is displayed on the PLABWIN10
Windows desktop.

Before continuing, please reset your devices. This will restore the default configuration of the device. Once the reset is
complete, proceed to the next exercise.

Exercise 6 - Using VNC and SSH


Virtual Network Computer or VNC is a graphical desktop sharing program that allows you to control another computer remotely.
This tool transmits the keyboard and mouse movements on your computer to a remote system and responds with graphical screen
updates. All this communication takes place over a network. 5900 is the default port for VNC.

Many VNC variants are available for free public download. You can explore these to select the one most suited to your
requirement(s).

Similarly, Secure Shell or SSH is an encrypted network protocol for initiating text-based shell sessions on remote systems. SSH
allows a user to run commands on a machine’s terminal window without being physically present at the machine. SSH is similar to
telnet. The difference being that SSH provides a secure channel over an insecure network.

In this exercise, you will use RealVNC (a VNC app) and Putty (an SSH app) to administer the PLABDC01 and the PLABRTR01
devices respectively remotely.
To better understand this technology, also refer to your course material or use your preferred search engine to research this topic in
detail.

Alert: Before beginning this exercise, you will must all devices to their default settings. In order to do this, click on the
rotating arrow icon at the bottom of the device bar as shown in the following figure. When you are asked if you are sure, click
Continue.

Learning Outcomes
After completing this exercise, you will be able to:

Configure VNC and SSH

Your Devices
You will be using the following devices in this lab.

PLABDC01 (Domain Controller - Windows Server 2016)


PLABWIN10 (Workstation - Windows 10)

Task 1 - Configure the VNC Server on PLABDC01

You can use any of the VNC implementations to connect to the desktop of devices remotely. In this task, you will configure the VNC
server on the PLABDC01 device to receive connection requests and to serve them appropriately.

In this task, you will be using TightVNC as the VNC server.

To do so, follow these steps:

Step 1
Connect to the PLABDC01 device. Minimize the Server Manager. At the far right of the taskbar, click the up arrow beside the
Network status icon. You will see the TightVNC icon. Right click on this icon and choose Configuration…
Figure 6.1 Screenshot of the PLABDC01 desktop: Context menu (that appears on right-clicking the TightVNC icon on the
taskbar) > Configuration menu-options are highlighted on the PLABDC01 Windows desktop.

Step 2
On the TightVNC Control Authentication window, enter the following password and click OK:

Passw0rd
Figure 6.2 Screenshot of the PLABDC01 desktop: TightVNC Control Authentication dialog box is displayed showing the
required value typed-in, and the OK button highlighted.

Step 3
The TightVNC Service Configuration window appears. Verify the following settings:

The Accept incoming connections checkbox is checked


The Main server port is set to 5900
The Require VNC authentication checkbox is checked

Once you have verified the above, click on the Change… button in the Primary password… section.
Figure 6.3 Screenshot of the PLABDC01 desktop: TightVNC Service Configuration dialog box is displayed showing the
required settings performed, and the relevant Change button highlighted.

Step 4
In the Enter new password and Re-type password for verification fields, enter the following and click OK:

Passw0rd
Figure 6.4 Screenshot of the PLABDC01 desktop: Change Password dialog box is displayed showing the required values
typed-in, and the OK button highlighted.

Step 5
On the TightVNC Service Configuration dialog box, click OK
Figure 6.5 Screenshot of the PLABDC01 desktop: TightVNC Service Configuration dialog box is displayed showing the
required settings performed, and the OK button highlighted.

Step 6
At the far right of the taskbar, click the up arrow beside the Network status icon once again. You will see the TightVNC icon. Hover
the mouse over the icon and verify that the service is running. If a note pops up indicating the IP address of the server, the service
has been enabled successfully.
Figure 6.6 Screenshot of the PLABDC01 desktop: Popup note above the TightVNC icon indicating the IP address of the
server is displayed on the PLABDC01 Windows desktop.

Task 2 - Connect to the PLABDC01 server using VNC

In this task, you will connect to PLABDC01 from the PLABWIN10 device using a VNC client. In this task, you will be using
RealVNC as the VNC client or viewer.

Note that the VNC server and viewer are from two different providers. However, VNC is an open protocol, and this allows
for the seamless interoperation between software packages of different vendors.

To do so, follow these steps:

Step 1
Connect to PLABWIN10 device. Click the VNC Viewer on the desktop to open the VNC client.
Figure 6.7 Screenshot of the PLABWIN10 desktop: VNC Viewer is highlighted on the Desktop.

Step 2
The VNC Viewer: Connection Details window appears. Enter the following in the VNC Server: field:

plabdc01

Click Connect.
Figure 6.8 Screenshot of the PLABWIN10 desktop: VNC Viewer - Connection Details dialog box is displayed showing the
required values typed-in and the Connect button available.

Step 3
You are then prompted for a password. Enter the following and click OK.

Passw0rd
Figure 6.9 Screenshot of the PLABWIN10 desktop: VNC authentication dialog box is displayed showing the relevant login
credentials typed-in and the OK button available.

Step 4
A new window opens within which the login screen of the PLABDC01 device is being displayed. In order to log in, you will have to
send a Ctrl+Alt+Delete command. However, if you do so, the PLABWIN10 device will intercept it and give you the Windows
lock options menu.
Figure 6.10 Screenshot of the PLABDC01 virtual desktop: plabdc01 - RealVNC virtual desktop prompting to press
Ctrl+Alt+Delete to unlock is displayed.

Step 5
In order to send a Ctrl+Alt+Delete sequence to the PLABDC01 device, first press F8. The RealVNC shortcut menu appears.

When you press F8, make sure the RealVNC window is in focus, or active. To make sure it is active, just click on it before
pressing F8. Otherwise, the F8 command will be ignored.
Figure 6.11 Screenshot of the PLABDC01 virtual desktop: plabdc01 - RealVNC virtual desktop showing the RealVNC
shortcut menu is displayed.

Step 6
Find the Send Ctrl-Alt-Del menu item and click it.
Figure 6.12 Screenshot of the PLABDC01 virtual desktop: plabdc01 - RealVNC virtual desktop showing the required
menu-option selected on the RealVNC shortcut menu is displayed.

Step 7
The password field appears. Enter the following password and press Enter.

Passw0rd
Figure 6.13 Screenshot of the PLABDC01 virtual desktop: Login screen to the plabdc01 - RealVNC virtual server showing
the required login credentials typed-in is displayed.

Step 8
You have successfully logged in to the PLABDC01 device using VNC. Open the Internet Explorer web browser on the
PLABDC01 device via VNC.

If the taskbar on the PLABDC01 device is not shown, you may need to scroll down until it becomes visible.
Figure 6.14 Screenshot of the PLABDC01 virtual desktop: Internet Explorer icon is highlighted on the taskbar on the
plabdc01 - RealVNC virtual desktop.

Step 9
Go to the “real” desktop of PLABDC01. Notice that the browser window that you opened is also open on this device.

Unlike RDP, VNC provides a remote desktop connection to the current active user environment on the PLABDC01 device in
real-time. RDP, on the other hand, provides a separate instance of a desktop that does not affect what the local user sees.
This is a fundamental difference between RDP and VNC.
Figure 6.15 Screenshot of the PLABDC01 desktop: Browser window opened using the remote connection is displayed on
the PLABDC01 Windows desktop.

Step 10
At the far right of the taskbar, click the up arrow beside the Network status icon. You will see the TightVNC icon once again.
However, it has a different color. This indicates that someone is currently connected to this computer via VNC.
Figure 6.16 Screenshot of the PLABDC01 desktop: RealVNC icon is displayed above the taskbar on the PLABDC01
Windows desktop.

Task 3 - Verify the Details of the VNC Session

In this task, you will examine and verify the details of the VNC session in progress between PLABDC01 and PLABWIN10.

To verify the details of the VNC session, perform the following these steps:

Step 1
Return to the PLABWIN10 device and minimize the VNC window connected to PLABDC01.

Click Start and type cmd. Once the Command Prompt appears in the menu, click it.
Figure 6.17 Screenshot of the PLABWIN10 desktop: Command Prompt menu-option is highlighted on the Start menu.

Step 2
Using the command netstat, you will generate a text file which indicates all of the active Transport Layer sessions on the
PLABWIN10 device. To create this text file, issue the following command:

netstat -a -o -n > ports1.txt

Press Enter.
Figure 6.18 Screenshot of the PLABWIN10 desktop: Command to create a text file listing all the active Transport Layer
sessions on the PLABWIN10 device is typed-in, and the system response to the command is displayed on the
Administrator Command Prompt window.

Step 3
To view the output of the command found in the ports1.txt file, issue the following command:

notepad ports1.txt

Press Enter.
Figure 6.19 Screenshot of the PLABWIN10 desktop: Command to display the text file listing all the active Transport Layer
sessions on the PLABWIN10 device is typed-in on the Administrator Command Prompt window.

Step 4
A Notepad window appears with the contents of the ports1.txt file.

On the Foreign address column, locate the instance of 5900. This instance indicates the VNC session established between
PLABDC01 and PLABWIN10. 5900 is the default port for VNC.

Corresponding to this entry, locate 192.168.0.4:xxxxx entry under the Local Address column. Here 192.168.0.4 is the
PLABWIN10 IP address. The xxxxx is the dynamic port number (any unused port number) assigned to the VNC session to enable
the server to connect to the PLABDC01 device. This entry gives the details of the VNC session setup among the two servers.

Close the Notepad and the command prompt windows.


Figure 6.20 Screenshot of the PLABWIN10 desktop: System response to the command typed-in in the previous step is
displayed on the PLABWIN10 desktop.

Task 4 - Verify that SSH is running on PLABRTR01

To setup an SSH session, you need first to ensure that SSH is running as a service on the PLABRTR01 device. Ubuntu devices
usually have SSH enabled by default.

To verify this, perform the following steps:

Step 1
Connect to the PLABRTR01 device. Press Enter and click on the Admin icon and type the following for the password:

Passw0rd
Press Enter.
Figure 6.21 Screenshot of the PLABRTR01 desktop: Login screen is displayed with the required password typed-in.

Step 2
Click on the Terminal icon on the left to open a Terminal window.
Figure 6.22 Screenshot of the PLABRTR01 desktop: the Terminal icon is highlighted on the PLABRTR01 Windows
desktop.

Step 3
Type the following command to determine which servers are running and on which ports these services are listening for incoming
sessions:

netstat -at

Press Enter.
Figure 6.23 Screenshot of the PLABRTR01 desktop: administrator@PLABRTR01 window is displayed showing the
command to list all the services running on the device and the ports these services are listening for incoming sessions
typed-in.

Step 4
Notice in the output that there is an entry with the ssh port which is in the LISTEN state. This means that the SSH server is
currently active and is listening on the default port for incoming SSH sessions. The default port for SSH is 22.
Figure 6.24 Screenshot of the PLABRTR01 desktop: administrator@PLABRTR01 window is displayed showing system
response to the command typed-in in the previous step.

Task 5 - Initiate an SSH session

In order to initiate an SSH session, an SSH client must be used on the host initiating the session. PuTTY is one such SSH client. In
this task, you will use PuTTY to setup an SSH session between PLABSA01 and the PLABRTR01 Ubuntu device.

Step 1
Connect to the PLABSA01 device. Minimize the Server Manager and double-click the Putty icon on the desktop.
Figure 6.25 Screenshot of the PLABSA01 desktop: the putty.exe icon is highlighted on the PLABSA01 Windows desktop.

Step 2
The Putty Configuration dialog box appears.

In the Host Name (or IP address) field type the following:

plabrtr01

Make sure that the Connection type is set to SSH. Notice that the port indicated is 22 which is the default port for SSH.

Click Open.
Figure 6.26 Screenshot of the PLABSA01 desktop: PuTTY Configuration dialog box is displayed showing the required
settings performed, and the Open button highlighted.

Step 3
A PuTTY Security Alert appears. This alert shows up the first time that you connect via SSH. It gives the opportunity for the
server to send the encryption key to the client and to have it saved for future use. This exchange is necessary for the encrypted
communication between the two devices.

Click Yes to accept the key.

All subsequent connections to this device will not ask for the key again since it has been saved into PuTTY’s cache.
Figure 6.27 Screenshot of the PLABSA01 desktop: PuTTY Security Alert box is displayed prompting for exchange of
encryption key and the Yes button available.

Step 4
The remote device now asks for login credentials. Enter administrator as the username and press Enter.

Remember that you are connecting to a Linux server and unlike Windows, the username is case sensitive.
Figure 6.28 Screenshot of the PLABSA01 desktop: plabrtr01 - PuTTY window is displayed showing the relevant login
credentials typed-in.

Step 5
Wait for a couple of seconds to allow the password prompt to appear.

For the password, type:

Passw0rd
Press Enter.

Note: You will not see the password being typed as characters are masked. Do not forget to press Enter after you finish
typing the password.
Figure 6.29 Screenshot of the PLABSA01 desktop: plabrtr01 - PuTTY window is displayed showing the relevant login
credentials typed-in.

Step 6
When you log in successfully, you will be provided with a command prompt. Note that this is the same command prompt that you
would see on the PLABRTR01 device if you connected directly to a Terminal window.

Maximize the window for ease of use.


Figure 6.30 Screenshot of the PLABRTR01 virtual desktop: The administrator@PLABRTR01 command prompt window is
displayed.

Task 6 - Perform basic administrative work via SSH

In this task, it will be demonstrated how administration tasks can be implemented on a remote device as if you were directly
connected to the Terminal window on the desktop. To do this, you will create a user and a group, and you will make the user a
member of this group. Please note that commands in Linux are case-sensitive. Therefore, be on the lookout for the proper case of
the commands.

Note: In order to implement these tasks, you will need administrator privileges. For this reason, you will precede each
command with the command sudo. Whenever necessary, the system will as for the administrator password.

To create a user and group, follow these steps:

Step 1
While in the Putty window, to create a user and create the user’s home directory, type:

sudo useradd -m johnsmith


When asked to enter a password, type the following and then press Enter.

Passw0rd

Figure 6.31 Screenshot of the PLABRTR01 virtual desktop: administrator@plabrtr01 window is displayed showing the
command to create a user and the user’s home directory typed-in and system response to the command.

Step 2
The user johnsmith is now created.

Please note that in the previous step and even in the next ones, when a Linux command is successfully executed, you will not
get a confirmation. The next prompt simply appears. However, if a command is not recognized or is inputted incorrectly, an
error message will be displayed.

To set johnsmith’s password, type:

sudo passwd johnsmith

Press Enter.
Figure 6.32 Screenshot of the PLABRTR01 virtual desktop: administrator@plabrtr01 window is displayed showing the
command to set a user’s password typed-in.

Step 3
When asked for johnsmith’s new UNIX password, type:

Passw0rd

Press Enter.

When asked to retype new UNIX password, type:

Passw0rd

Press Enter.
Figure 6.33 Screenshot of the PLABRTR01 virtual desktop: administrator@plabrtr01 window is displayed showing the
required passwords typed-in and system response to the same.

Note that if the passwords entered do not match, you will be given an error message and no new password will have been
set. In order to try again, enter the same command.

Step 4
User johnsmith’s password has been successfully set.

To give John Smith the capability to install the software you need to add him to the sudo group.

Type:

sudo usermod -a -G sudo johnsmith

Press Enter.

Below you will find an explanation of the format used for this command:

-a means to append the user to target security group.


-G indicates the name of the target security group
sudo (sometimes called SuperUser Do) is a security group that has rights to add or install programs in Linux. This also
refers to an application for Unix-like operating systems that allows users to run programs with security privileges of a
superuser.

Figure 6.34 Screenshot of the PLABRTR01 virtual desktop: administrator@plabrtr01 window is displayed showing the
command to add a user to the sudo group typed-in.

Step 5
The command to add johnsmith to the sudo group is successfully implemented.

To create a security group called Helpdesk, type:

sudo groupadd Helpdesk

Press Enter.
Figure 6.35 Screenshot of the PLABRTR01 virtual desktop: administrator@plabrtr01 window is displayed showing the
command to create a security group typed-in.

Step 6
The group Helpdesk is successfully created.

To add johnsmith as a member of Helpdesk security group, type:

sudo usermod -a -G Helpdesk johnsmith

Press Enter.
Figure 6.36 Screenshot of the PLABRTR01 virtual desktop: administrator@plabrtr01 window is displayed showing the
command to add a user to a security group typed-in.

Step 7
In a later task, you will test johnsmith’s user account by attempting to login to the PLABRTR01 device.

First, you will need to change the login shell or interface of the johnsmith user. To do this type:

sudo chsh -s /bin/bash johnsmith

Press Enter.

The command you typed above indicates the following:

-s means shell
/bin/bash is the path to the shell
Figure 6.37 Screenshot of the PLABRTR01 virtual desktop: administrator@plabrtr01 window is displayed showing the
command to change the login shell of a user typed-in.

Step 8
To sign out of the user, type

logout

Press Enter. The Putty window closes automatically.


Figure 6.38 Screenshot of the PLABRTR01 virtual desktop: administrator@plabrtr01 window is displayed showing the
command to logout a user typed-in.

Task 7 - Login as another user

To login as johnsmith, the user you created earlier, follow these steps:

Step 1
Double-click the Putty icon on the desktop.
Figure 6.39 Screenshot of the PLABSA01 desktop: the putty.exe icon is highlighted on the PLABSA01 Windows desktop.

Step 2
The Putty Configuration dialog box appears.

In the Host Name (or IP address) field type the following:

plabrtr01

Make sure that the Connection type is set to SSH. Notice that the port indicated is 22 which is the default port for SSH.

Click Open.
Figure 6.40 Screenshot of the PLABSA01 desktop: PuTTY Configuration dialog box is displayed showing the required
settings performed, and the Open button highlighted.

Step 3
The remote device now asks for login credentials. Enter johnsmith as the username and press Enter.
Figure 6.41 Screenshot of the PLABSA01 desktop: plabrtr01 - PuTTY window is displayed showing the relevant login
credentials typed-in.

Step 4
When password prompt appears, type:

Passw0rd
Press Enter.
Figure 6.42 Screenshot of the PLABSA01 desktop: plabrtr01 - PuTTY window is displayed showing the relevant login
credentials typed-in.

Step 5
User johnsmith has been successfully logged in when you see the johnsmith@PLABRTR01:~$ prompt.
Figure 6.43 Screenshot of the PLABSA01 desktop: johnsmith@PLABRTR01 window is displayed confirming that the user
John Smith is now logged in.

Step 6
To verify the identity of the currently logged in user, type:

whoami

Press Enter.
Figure 6.44 Screenshot of the PLABSA01 desktop: johnsmith@PLABRTR01 window is displayed showing the command
to identify the currently logged-in user typed-in.

Step 7
Notice that the johnsmith is the logged in user.

To find out the users available on this computer, type:

users

Press Enter.
Figure 6.45 Screenshot of the PLABSA01 desktop: johnsmith@PLABRTR01 window is displayed showing the command to
list the users available on the computer typed-in.

Step 8
Notice that user johnsmith is listed.

To find out the groups on this computer, type:

groups

Press Enter.
Figure 6.46 Screenshot of the PLABSA01 desktop: johnsmith@PLABRTR01 window is displayed showing the command
to list the groups available on the computer typed-in.

Step 9
Notice the groups johnsmith, sudo and Helpdesk are available.
Figure 6.47 Screenshot of the PLABSA01 desktop: johnsmith@PLABRTR01 window is displayed showing system
response to the command typed-in in the previous step.

Task 8 - Switch to root account

To switch to the root account while logged in as johnsmith, follow these steps:

root is the user name or account that by default has access to all commands and files on a Linux or other Unix-like
operating system. It is also referred to as the root account, root user, and the superuser.

Step 1
Type the following command:

sudo su -

Press Enter.
Figure 6.48 Screenshot of the PLABSA01 desktop: johnsmith@PLABRTR01 window is displayed showing the command
to switch to the root account for the currently logged in user typed-in.

Step 2
On the [sudo] password for johnsmith prompt, type:

Passw0rd

Press Enter.
Figure 6.49 Screenshot of the PLABSA01 desktop: johnsmith@PLABRTR01 window is displayed showing the required
password typed-in.

Step 3
Notice that the prompt has changed to root@PLABRTR01:~#
Figure 6.50 Screenshot of the PLABSA01 desktop: johnsmith@PLABRTR01 window is displayed showing the root
command prompt confirming that the user is now switched to root account.

Step 4
To sign out, type:

logout

Press Enter.
Figure 6.51 Screenshot of the PLABSA01 desktop: johnsmith@PLABRTR01 window is displayed showing the command to
logout the user typed in.

Step 5
You are now logged out of the root account. You are still logged in however as johnsmith. To log out as johnsmith, type:

logout

Press Enter.

The Putty window closes automatically.


Figure 6.52 Screenshot of the PLABSA01 desktop: johnsmith@PLABRTR01 window is displayed showing the command to
logout the user typed in.

Keep all devices that you have powered on in their current state and proceed to the next exercise.

Review
Well done, you have completed the Network Services and Protocols (Part 3) Practice Lab.

Summary
You completed the following exercises:

Exercise 1 - Configuring Port 21 for FTP


Exercise 2 - Configuring Port 161 for SNMP
Exercise 3 - Configuring Port 23 for Telnet
Exercise 4 - Configuring Port 445 for SMB
Exercise 5 - Configuring Port 3389 for RDP
Exercise 6 - Using VNC and SSH

You should now be able to:


Configure port 21 for FTP
Configure port 161 for SNMP
Configure port 23 for Telnet
Configure port 445 for SMB
Configure port 3389 for RDP
Configure VNC and SSH

Feedback

Shutdown all virtual machines used in this lab. Alternatively, you can log out of the lab platform.

You might also like