Tribhuvan University
Kritipur, Kathmandu Nepal
Faculty of Humanities and Social Sciences
GoldenGate International College
Battisputali, Trikuti Colony
Kathmandu, Nepal
Lab Report of Computer Networking(CACS-303)
Submitted By:
Bishwas Pradhan
Registration No.
Submitted To:
GoldenGate International College
Department of Bachelor in Computer Applications
Signature:
Internal Examiner External Examiner
Laboratory Assignment Log Sheet
Task No. Title Signature
General
1 Identify cable standards. Create and Test cross – over and
straight through cables.
2 Create a basic network and share file and folders.
Cisco Packet Tracer (RS – Ipv4)
3 Installing Cisco Packet Tracer
4 Creating a peer-to-peer Network
5 Implement the LAN topologies.
6 Creation of VLAN
7 Implementation of Static Routing Configuration
8 Implementation of Dynamic routing (OSPF) configuration
Linux Machine (Kali)
9 Kali(server/client) installation over Oracle VM
10 Linux Fundamentals
11 Users, Groups, Permission
12 Package and Service Management, and Firewall configuration
13 Network Configuration
14 DHCP Server Configuration
15 DNS Server Configuration
16 Apache Web Server Configuration
17 FTP Server Configuration
LABORATORY ASSIGNMENT 2024
INSTRUCTION
All the Lab is based on Cisco Packet Tracer.
GENERAL
Task 1
Identify cable standards. Create and Test crossover and straight through cables.
There are different standards for cabling in a building:
American National Standards Institute (NSI)
Electronic Industries Alliance (EIA)
Institute of Electrical and Electronic Engineers (IEEE)
International Organization for Standardization (ISO)
National Fire Protection Association (TIA)
Underwriters Laboratories, Inc. (UL)
Occupational Safety and Health Association (OSHA)
Out of these standards the EIA standard is mostly used in building and other standards also agree
to this standard.
Electronic Industries Alliance (EIA)
This standard is now managed by the Telecommunications Industry Association (EIA), so this
standard also called TIA/EIA. There are two types of standards for TIA/ELA which are listed
below:
TIA/EIA 568A
TIA/EIA 568B
TIA/EIA 568A and TIA/EIA 568B refer to the major standards used in the networking and
telecommunications industries. These standards used in the networking and telecommunications
industries. These standards determine the order of the wires placed in a RJ45 connector. With the
only difference between the two standards is the placement of cable pairs on set pins,
functionally both standards are the same.
The Pinout Positions of TIA/EIA 568A:
Pin 1: white and green stripe
Pin 2: green
Pin 3 : white and orange stripe
Pin 4: blue
Pin 5: white and blue strips
Pin 6: orange
Pin 7: white and brown stripe
Pin 8: brown
The Pinout Locations of TIA/EIA 568B:
Pin 1: white and orange stripe
Pin 2: orange
Pin 3: white and green stripe
Pin 4: blue
Pin 5 : white and blue stripe
Pin 6: green
Pin 7: white and brown stripe
Pin8: brown
Different Cabling Types
Straight-through Cable
Straight-through cables refer to connectors at each end of a patch cable terminated with the same
standard. In other words, Pin 1 connector A goes to Pin 1 on connector B, Pin 2 to Pin 2, etc.
Straight-Through wired cables are most commonly used to connect a host to a client.
Such cables are used to connect end-user devices to networking devices, such as hubs and
switches, and send a signal directly through.
Fig 1: Use of Straight-through cable and successful message transfer
Crossover Cable
Crossover cables are terminated at both ends with different standards. In other words, one side is
terminated with TIA/EIA 568A and the other is terminated with TIA/EIA 568B. To create a
crossover cable, Pin 1 is crossed with Pin 3 and Pin2 is crossed with Pin 6.
Crossover cables connect two hubs through the data port or provide a direct connection between
two workstations without using a switch or hub.
Fig 2: Use of Cross-over cable and successful message transfer
Rollover Cable
Rollover cables have opposite pinout positions on each end of the cable. Dissimilar to crossover
cables and straight-through cables, rollover cables are designed to create an interface with the
device rather than carry data.
Task 2
Create a basic network and share file and folders.
Sharing files using basic settings:
1. Right click the item, and select the properties option.
2. Click on the Sharing tab.
3. Click the Share button.
4. Use the drop-down menu to select the user or group to share a file or folder. (For this
guide, select the Everyone group)
5. Click Add button.
6. Under the “Permission Level” section, select the sharing permissions you want the folder
to have. For example, we can select Read (default) if you only want users to view and
open files. If you select Read/Write, users can view, open, modify, and delete the content
on the folder we are sharing.
7. Click the Share button.
8. Confirm the folder’s network path that others users will need to access the network’s
content and click the Done button.
9. Click the Close button.
Sharing files using advanced settings
To share files on a local network using the advanced sharing settings, use these steps:
1. Open File Explorer.
2. Navigate to the folder we want to share.
3. Right-click the item, and select the Properties option.
4. Click on the Sharing tab.
5. Click the Advanced Sharing button.
6. Check the Share this folder option.
7. Windows 11, by default , allows other uses read-only access to the content we share,
which means that they can only view files, but they cannot do anything else. If oyu want
users to edit the files, delete, and create new documents in the location, we will need to
click the Permissions button.
8. On the “Permission” window, we will notice the “Everyone” group is the default option
highlighted. In the section below, we can customized the permissions for a specific user
or group. If we want to open, edit, delete, and create files, then make sure to check the
Read and Change permissions under the “Allow” column.
9. Click the Apply button.
10. Click the OK button.
11. Click the OK button again.
CISCO PACKET TRACER (RS-IPV4)
Task 3
Installing Cisco Packet Tracer:
Step 1: Visit the official website of Netacad using any web browser.
Step 2: Press the login button and select sign up option.
Step 3: Next screen will appear and will ask for email and password and other simple details, fill
them and click on Register.
Step 4: Now the login screen appears again so fill the Email id and password.
Step 5: Dashboard will initialize, now click on courses, select one course and click the download
link.
Step 6: Now download the packet tracer version what we required.
Step 7: Check for the executable file in our system and run it.
Step 8: Next Screen contain License Agreement. So, Click on I accept the license.
Step 9: Choose the installing location which has sufficient space.
Step 10: Select the start menu folder and click the Next button.
Step 11: Check the box for creating a desktop icon and click on the Next button.
Step 12: Now packet tracer is ready to install so click on Install button.
Step 13: The installation process will start and will hardly take a minute.
Step 14: Click the Finish button to complete the installation.
Step 15: An icon is created on the desktop so run it.
Step 16: Interface is initialized and the software is ready to use.
Task 4
Creating a Peer-to-Peer Network
Equipment required:
o 2 Workstations
o 1 Ethernet Cable
Identify the cable (straight through, cross over or rollover) and connect the workstations
i.e, GGIC A and GGIC B.
Configure the layer 3 address to the workstations:
o GGIC A [Link]/24
o GGIC B [Link]/24
Verify Connectivity (ping command):
o Ping [Link] => ping from PC0 ([Link]) to PC1 ([Link])
Fig 3: peer-to-peer network and using ping command for verification
Task 5:
Implement the LAN topologies.
1. Toloplogy 1: Star Topology
Equipment required:
o 4 Worstations
o 4 Ethernet Cables
o 1 Switch
Identify the cable and connect the workstations with the switch:
o Cable used: Straight-through
Configure the layer 3 address to the workstations:
o PC0 [Link]/24
o PC1 [Link]/24
o PC2 [Link]/24
o PC3 [Link]/24
Verify Connectivity (ping command):
o ping [Link] using PC0
Fig 4: Star Topology and Using ping command for verification
2. Topology 2: Bus Topology
Equipment required:
o 4 Worstations
o 7 Ethernet Cables
o 4 Switch
Identify the cable and connect the workstations with the switch:
o Cable used: Straight-through and Cross-over
Configure the layer 3 address to the workstations:
o Laptop0 [Link]/24
o PC0 [Link]/24
o Laptop1 [Link]/24
o PC1 [Link]/24
Verify Connectivity (ping command):
o ping [Link] using PC0
o ping [Link] using PC0
Fig 5: Bus Topology
Fig 6: Using ping command for verification
3. Topology 3: Ring Topology
Equipment required:
o 4 Workstations
o 8 Ethernet Cables
o 4 Switch
Identify the cable and connect the workstations with the switch:
o Cable used: Straight-through and Cross-over
Configure the layer 3 address to the workstations:
o PC0 [Link]/24
o PC1 [Link]/24
o PC2 [Link]/24
o PC3 [Link]/24
Verify Connectivity (ping command)
o Ping [Link] using PC0
Fig 7: Ring Topology
Fig 8:Using ping command for verification
Task 6
Creation of VLAN
Equipment required:
o 8 workstations
o 5 Ethernet Cables
o 1 Switch
o 1 Router
Identify the cable and connect the workstations with the switch:
o Cable used: Straight-through
Configure the layer 3 address to the workstations:
o PC0 [Link]
o PC1 [Link]
o PC2 [Link]
o PC3 [Link]
o PC4 [Link]
o PC5 [Link]
o PC6 [Link]
o PC7 [Link]
Addressing Table:
Devices Interf IPv4 Subnet Mask Switch VLAN VLAN Link
ace Address Port No Name
PC0 NIC [Link] [Link] fa0/1 2 BCA Access
PC1 NIC [Link] [Link] fa0/2 2 BCA Access
PC2 NIC [Link] [Link] fa0/3 2 BCA Access
PC3 NIC [Link] [Link] fa0/4 2 BCA Access
PC4 NIC [Link] [Link] fa0/5 3 BCS Access
PC5 NIC [Link] [Link] fa0/6 3 BCS Access
PC6 NIC [Link] [Link] fa0/7 3 BCS Access
PC7 NIC [Link] [Link] fa0/8 3 BCS Access
VLAN Configuration:
Step Actions Commands
s
Configure Switch
1 Enable Switch Switch> enable
2 Enter global configuration mode Switch# config terminal
3 Enter VLAN configuration mode and/or Switch(config)# VLAN vlan-id
create a VLAN
4 Configure a name for the VLAN. Switch(config-vlan)#name
vlan-name
5 Enter interface configuration mode. Switch(config-vlan)#int
interface
6 Force the Port into Access mode Switch(config-if)#switchport
mode access
7 Configure the interface into a specific Switch(config-if)#switchport
VLAN. (If the VLAN doesn’t exist, it will be access vlan vlan-id
created.)
8 Configure the interface into a specific link. Switch(config-if)#switchport
(access trunk) mode trunk
9 Display the current VLANs and their Switch> show vlan
assignments.
Fig 9: switch configuration for VLAN
Verify Connectivity (ping command)
o ping [Link](using PC0)
o ping [Link](using PC0)
Fig 10: VLAN
Fig 11: Using ping command for verification from VLAN 2 to VLAN 3
Task 7
Implementation of Static Routing configuration
Equipment required:
o 4 Workstations
o 7 Ethernet Cables
o 2 Switches
o 2 Routers
Identity the cable and connect the workstations with the switch:
o Cable used: Straight-through and Cross-Over
Configure the layer 3 address to the workstations:
o PC0 [Link]
o PC1 [Link]
o PC2 [Link]
o PC3 [Link]
Change the default gateways:
o PC0,PC1 [Link]
o PC2,PC3 [Link]
Addressing Table:
Devices Interface IPV4 Address Subnet Mask Port
PC0 NIC [Link] [Link] S0/fa0/1
PC1 NIC [Link] [Link] S0/fa0/2
PC2 NIC [Link] [Link] S1/fa0/1
PC3 NIC [Link] [Link] S1/fa0/2
Switch0 S0,fa0/3 [Link] [Link] R0,g0/0/0
Switch1 S1/fa0/3 [Link] [Link] R3,g0/0/1
Router0 R2,g0/0/1 [Link] [Link] R3,g0/0/0
Router1 R3,g0/0/0 [Link] [Link] R2,g0/0/1
Static Configuration:
o Enter the IP address for g-/0/0 & g0/0/1 of Router 1 and turn the port status to
ON.
Fig 12: address the IP addresses and turning the port status “ON”
o Enter the IP address for g0/0/0 & g0/0/1 of Router 0 and turn the port status to
ON.
Fig 13: adding the IP addresses and turning the port status “ON”
o Configure the static routing:
Steps Actions Commands
Configure Router0 and Router1
1 Enable Router Router> enable
2 Enter global configuration mode. Router# config terminal
3 Add IP address for routing with next Router(config)# IP route <ip
hop IP address address><subnet mask><next
hop id>
4 Exit Router(config)# exit
Fig 14: Router0 Configuration
Fig 15: Router1 Configuration
Fig 16: Static Routing
Using ping command:
o ping [Link] (from PC2 [Link])
o ping [Link] (from PC3 [Link])
o ping [Link] (from PC0 [Link])
o ping [Link] (from PC1 [Link])
Fig 17: ping [Link] (from PC2 [Link])
Fig 18: ping [Link] (from PC3 [Link])
Fig 19: ping [Link] (from PC0 [Link])
Fig 20: ping [Link] (from PC1 [Link])
Task 8
Implemetation of dynamic routing (OSPF) configuration
Equipment required:
o 4 Workstations
o 7 Ehernet Cales
o 2 Switches
o 2 Routers
Identify the cale and connect the workstations with the switch:
o Cable Used: Straight-through, Serial and Cross-Over
Configure the layer 3 address to the workstations:
o PC0 [Link]
o PC1 [Link]
o PC2 [Link]
o PC3 [Link]
Change the default gateways:
o PC0,PC1 [Link]
o PC2,PC3 [Link]
Addressing Table:
Devices Interface IPV4 Address Subnet Mask Port
PC0 NIC [Link] [Link] S0/fa0/1
PC1 NIC [Link] [Link] S0/fa0/2
PC2 NIC [Link] [Link] S1/fa0/1
PC3 NIC [Link] [Link] S1/fa0/2
Switch0 S0,fa0/3 [Link] [Link] R0,g0/0/0
Switch1 S1/fa0/3 [Link] [Link] R3,g0/0/1
Router0 R2,g0/0/1 [Link] [Link] R3,g0/0/0
Router1 R3,g0/0/0 [Link] [Link] R2,g0/0/1
Configure the dynamic routing:
Step Action Command
1 Enable Router Router>enable
2 Enter Global Configuration Router#configure terminal
Mode
3 Enter Gigabit Ethernet Router(config)#interface gigabitEthernet0/0/0
interface configuration
mode (Router-to-Router
connection)
4 Assign IP address to the Router(config-if)#ip address [Link]
interface [Link] (Router0)Router(config-if)#ip
address [Link] [Link] (Router1)
5 Enable the interface Router(config-if)#no shutdown
6 Enter Gigabit Ethernet Router(config)#interface gigabitEthernet0/0/1
interface configuration
mode (Router-to-Switch
connection)
7 Assign IP address to the Router(config-if)#ip address [Link]
LAN interface [Link] (Router0)Router(config-if)#ip
address [Link] [Link] (Router1)
8 Enable the interface Router(config-if)#no shutdown
9 Enter OSPF routing Router(config)#router ospf 1
configuration mode
10 Advertise Router-to-Router Router(config-router)#network [Link]
[Link] area 0
network
11 Advertise LAN network Router(config-router)#network [Link]
[Link] area 0 (Router0)Router(config-
router)#network [Link] [Link] area 0
(Router1)
12 Exit configuration mode Router(config-router)#end
13 Save the configuration Router#write or Router#copy running-config
startup-config
Fig 21: Configuring router0
Fig 22: Configuring router1
Fig 23: OSPF configuration
Using ping command:
o ping [Link] (from PC2 [Link])
o ping [Link] (from PC3 [Link])
o ping [Link] (from PC0 [Link])
o ping [Link] (from PC1 [Link])
Fig 24: ping [Link] (from PC2 [Link])
Fig 25: ping [Link] (from PC3 [Link])
Fig 26: ping [Link] (from PC0 [Link])
Fig 27: ping [Link] (from PC1 [Link])
LINUX MACHINE (KALI)
Task 9
Kali (server/client) installation over Oracle VM:
Kali Linux offers ISO images for 32-it, 64-it and ARM64 architectures. To download an ISO
file:
Step 1: Download Kali Linux ISO Image
1. Visit the installer section of the Kali Linux official website.
2. Select the system architecture of the host OS and download the ISO file by clicking the
button in the bottom-left corner of the installer card.
Step 2: Create Kali Linux VirtualBox Instance
Create a new virtual machine and configure it to run Kali Linux. Proceed with the steps below to
correctly set up a Kali Linux VM in VirtualBox.
1. Launch VirtualBox Manager and click the New icon.
2. Specify a name for the VM and provide the path to the ISO image. Select Next.
3. Select the amount of memeory and the number of virtual CPUs to allocate to the VM.
The minimum recommended values for Kli Linux are 2 GB of RAM and 1 CPU. Select
Next when you finish setting up the VM hardware.
4. Select the option to create a virtual hard disk now and then click on the create button
5. Now, Select the Hard Disk File type for Virtual Hard Disk. ( VDI is recommended for
daily purposes)
6. Select the size of your virtual hard disk and also the location where you want to save your
machine and its files.
Step 3: Start VM and Load ISO
1. As soon as the processing is completed click on the Virtual machine name on the left
panel and click on the start button from the top.
2. Now click on the Browse icon located just above the cancel button and select your
downloaded Kali Linux ISO file and then click on the start button.
3. This will boot our virtual machine from the chosen Kali Linux ISO file. Select the
Graphical Install button and hit enter.
Step 3: Basic System Configuration
1. The next option is to select a language, So select your desired language and hit enter.
2. The next step is to select a country, territory or area, So select your respective one
3. The next step is to configure your keymap. Confirm the keymap you want to use and
click Next
4. In the next step it is asking for a hostname, Enter the same and press the continue button.
5. The next step is to enter the domain name of your choice you may leave it blank if you
don't have any.
6. Enter a strong password for your Kali Linux OS and click continue.
The next step is to select a time zone of your choice which you want to use as a default
time zone for the Kali Linux machine
Step 5: Disk Partitioning
1. Now click on the "Manual" option and press continue to confirm.
2. Now select the Free Space and create a new partition with that and click continue. Also, it
is recommended for new users to not use a separate partition for root, home and swap
areas.
3. Now click on create a new partition.
4. Now enter the partition size to be created.
5. Now select the partition type as “Logical”.
6. Now if you are new to Linux then use the following settings for the partition or you may
also adjust them as per your need. And then click on "Done setting up the partition"
7. Now just click on finish partitioning and write changes to disk
8. Now select the "no" option in order to continue.
9. Now in order to write changes to the disk select the "yes" option and then click on
continue.
Step 7: Installation Process
Now, wait for a few minutes for the Kali system to be installed into your virtual machine
Step 8: Bootloader Setup
1. The next option is to select whether to install the GRUB boot loader to the master boot
record or not. Click on yes to add the same.
2. Choose your respective hard disk to boot into, from the list of devices.
Step 9: Final Setup and Boot
1. This will start installing the Kali Linux OS and will take a few minutes to completely
install the same and will reboot after the successful completion of the installation.
2. Once the complete process is finished successfully, It will automatically restart the virtual
machine and will boot the Kali Linux OS.
3. In order to close the virtual machine, Simply Shutdown the Kali Linux OS, this action
will automatically terminate the virtual machine.
Task 10
Linux Fundamentals
1. Introduction to Linux:
What is Linux?
o Linus is an open-source operating system based on the UNIX architecture.
o Popular for its stability, security and flexibility.
Components:
o Kernel: Core of the operating system.
o Shell: Interface between user and system.
o File System: Organize and manages files and directories.
2. Basic Linux Commands:
Navigation:
o pwd: Print working directory.
o ls: List files and directories.
o cd: Change directory
File and Directory Management
o touch: Create a new file.
o mkdir: Create a directory.
o cp, mv, rm: Copy, move amd remove files.
Viewing Files:
o cat, more, less: View file content.
o head, tail: View the beginning or end of a file.
3. Linux File System
Structure:
o Root directory / is the starting point.
o Linux FileSystem Hierarchy:
/boot: Contains files needed to boot the system (e.g., GRUB
configuration)
/user: User-related programs and libraries.
/home: User home directories.
/usr/bin: Binaries for normal users.
/bin: Essential binaries (e.g., ls, cp).
/usr/sbin: System admin binaries.
/sbin: Essential system binaries.
/usr/lib64,/lib64,usr/lib,/lib: Libraries for programs and sysrem.
/dev: Device files.
/etc: Configuration files.
/media: Mount points for removable media.
/mnt: Temporary mount points.
/opt: Optical software.
/proc: Virtual filesystem for processes.
/tmp: Temporary files.
/var: Variable data (e.g., logs, spools).
/run: Information about the system runtime.
4. Networking in Linux:
Checking Network Configuration:
o ifconfig or ip a: View network interfaces.
o ping: Test network connectivity.
o netstat, ss: View network statistics.
File Transfer:
o scp, rsync: Copy files between systems.
o wget, curl: Download files from the Internet.
5. Login from root user then create folders according to following tree structure.
Log in as root:
Create the structure:
Viewing the structure:
6. Copy all the files that have .conf filename extensions inside /etc directory to
/root/backup directory.
Create /root/backup:
Copy .conf files:
View copied files:
7. Create a directory /root/selected the move all files of /root/backup directory that
have ‘o’ or ‘a’ as the second character of their file name to /root/selected directory.
Create /root/selected:
Move files:
View moved files:
8. Remove second character with r in path /root/backup.
Command to replace second character with r:
View files:
Remove all files and directories in path /root/backup
TASK 11
Users, Groups:
1. Create a user named student.
Create new user student.
Set password for user student:
2. Login from student user then create files and folders according to following tree
structure. [where, d = directory]
Log in as the student user:
Create the directory structure:
View the directory:
Create the files within their respective directories:
TASK 12
Package and Service Management, and Firewall Configurations:
Below are the commands and steps to complete the given tasks for Package and Service
Management and Firewall Configurations on a Linux system.
Step 1: Update Repositories and System:
a. Update the repository list:
b. Upgrade any outdated packages:
Step 2: Install and Configure firewalld
a. Install the firewalld package:
b. Start and enable the firewalld service:
c. Check the status of the firewall:
d. Confirm that the firewall is active:
Step 3: Install and Configure HTTP Server (Apache):
a. Install the apache2 package (Apache HTTP server):
b. Start and enable the Apache services:
c. Verify that Apache2 is running:
Step 4: Configure Firewall Rules
Allow Specific Services and Ports
a. Allow HTTP (web) traffic:
b. Allow SMTP traffic and specific ports:
c. Reload the firewall to apply to changes:
Block Specific Services and Ports
a. Remove the SMTP service:
b. Remove the SMTP ports:
c. Reload the firewall again:
Step 5: Verify Firewall Configuration
a. List all firewall rules and verify the changes:
TASK 13
Network Configuration
Step 1: Assigning an IP Address from DHCP Server
a. Find your Interface Name:
b. Assign IP Address via DHCP. Run the following commands to obtain an IP address from
the DHCP server.
c. Verify IP Address Assigned:
Step 2: Configure the Network Interface with IPv4 Address
a. Edit the Network Interface Configuration File:
b. Add static IP Configuration for eth0: Add the following lines to configure eth0 with IPv4:
c. Restart the Networking Service:
d. Enable Networking at Boot:
e. Verify the IP Address:
Step 3: View the Current Hostname Status
a. Check the Current Hostname:
Step 4: Resolve the Hostname with Static IP Address Using Local DNS.
a. Edit the /etc/hosts File:
b. Add an Entry for Hostname and IP. For example, if static IP is [Link] and
hostname is kali-pc
c. Test Hostname Resolution:
TASK 14
DHCP Configuration:
Step 1: Install the dhcp package
a. Update the package list:
b. Install the isc-dhcp-server package (which provides the dhcpd service):
Step 2: Start and Enable the dhcpd Service
a. Start the DHCP service:
b. Enable the DHCP service to start at boot:
c. Check the status of the dhcpd service:
Step 3: Configure Firewall to Allow DHCP Packets:
a. Allow DHCP packets (UDP port 67) through the firewall:
b. If firewall is used, allow DHCP packets with:
Step 4: Configure DHCP Server
a. Edit the DHCP configuration file located at /etc/dhcp/[Link]:
b. Add these configurations:
Step 5: Restart the DHCP Service
Restart the DHCP service for the changes to take effect:
Step 6: Check DHCP Lease Information
To view the list of DHCP leases, you can check the lease file at
/var/lib/dhcp/[Link]:
Step 7: Verify DHCP Server Operation
To check if the DHCP server is assigning IP addresses to clients, use the systemctl status
command:
TASK 15
DNS Server Configuration
a. Install bind and bind-utils package as well as start and enable services.
Install necessary DNS packages:
b. Allow dns packets to enter through firewall.
Start the DNS service (named) and enable it to run on boot:
Configure the Firewall to Allow DNS Packets
c. Configure the system as DNS Server:
Open the file:
Update the forwarders section to point to upstream DNS servers:
Allow queries from the local network. Add the network CIDR in the allow-query block:
d. Resolve the hostname with the static IP address using DNS Server.
Open /etc/bind/[Link] to define zones:
Add the zone configuration for the domain:
Create the zone file:
Check the configuration syntax:
Restart the bind9 service to apply the changes:
Add the DNS server IP to the system’s DNS resolver: Open /etc/[Link] and add
nameserver [Link]:
Use the nslookup command to resolve the hostname:
TASK 16
Apache Web Server Configuration
a. Install httpd package as well as start and enable httpd services.
Install the apache2 package (in KaliLinux, apache2 is used instead of httpd):
Start and enable the apache2 service:
Verify that the service is running:
b. Allow http packets to enter through forewall.
Open port 80 (HTTP) for both TCP and UDP:
c. Set up a simple virtual host called <yourname>.[Link] with [Link] placed in
DoumentRoot /var/www/html.
Create a configuration file for the virtual host:
Add the following content to configure the virtual host:
Create the DocumetRoot directory:
Create a sample [Link] file in the DocumentRoot:
Add the following content:
Enable the virtual host configuration:
Restart the Apache service:
Edit the /etc/hosts file to resolve [Link] to your local IP address:
Open a browser or use curl to check if the virtual host is working:
TASK 17
FTP Server Configuration:
a. Install ftp package as well as start and enable ftp services:
Install the vsftpd package:
Start and enable the vsftpd service:
Verify that the service is running:
b. Allow ftp packets to enter through firewall.
Open ports 20 1nd 21 (FTP):
c. Allow FTP login to anonymous FTP users.
Open the vsftpd configuration file:
Add these:
Create the FTP directory (is if doesn’t already exist):
Set appropriate permissions:
Add some files for testing:
Restart the vsftpd service to apply changes:
Test FTP access from the same machine:
When prompted for a username, type anonymous and press Enter. For the password,
press Enter or provide the email address.