SNA-Group_Assignment
SNA-Group_Assignment
NPT2F2409IT
Weightage: 30%
Introduction......................................................................................................................................1
System Installation...........................................................................................................................1
System Configuration....................................................................................................................26
Configuration of User................................................................................................................26
Configuration of Network..............................................................................................................34
Check Routing........................................................................................................................36
Firewall Configuration...................................................................................................................39
Conclusion.....................................................................................................................................60
APPENDIX....................................................................................................................................61
Workload Matrix........................................................................................................................61
LIST OF FIGURES
Figure 30: Clicking the erase disk and install ubuntu, click to next..............................................17
Figure 31: Filling the form details and creating the user in Ubuntu..............................................17
Figure 50: Displaying the contents of Location.docx using the cat Command.............................29
Figure 52: Displaying Time Zone Information from a File in Linux Terminal.............................29
Introduction
user administration, network planning, security protocols, and data exchange methods. The
servers together with firewall rule configuration and file sharing using NFS and establishing
secure communication through Certificate Authority (CA). Testing and improving configuration
procedures resolved all issues while developing a steady and efficient network foundation.
System Installation
2. Install VirtualBox
I open the Virtual Box and click the next button to create virtual machine.
Type: Linux
3
3. Allocate RAM:
This image shows the creation of a virtual hard disk, disk size of a 50 GB.
4
Installation
Figure 1.1.6:
Language Selection
Keyboard Layout:
Disk Setup
User Setup
5. Finalize Installation
6. Log In to Ubuntu
After downloading the VMware software you can activate “Create a new virtual
My selected task was “I will install the operating system later” to create a virtual machine
I selected the linux operating system with Ubuntu 64 bit as the suitable platform for my
configuration.
I chose Ubuntu 64-bit as the Virtual machine name while selecting local disk D as its
I entered the device name followed by the computer name, username, and password.
The above Figure: illustrates the ubuntu server website and downloads it.
I began by opening VirtualBox and starting the process of creating a new virtual machine
through "New." The first step was to give my new virtual machine a name followed by selecting
its "Linux" operating system with "Ubuntu (32-bit)" version. Moving forward with the setup I
3. Allocate RAM:
The above image illustrates the creation of a virtual hard disk with a disk size of 50 GB.
15
Installation
Language Selection
Keyboard Layout:
16
Disk Setup
17
Figure 30: Clicking the erase disk and install ubuntu, click to next.
User Setup
Figure 31: Filling the form details and creating the user in Ubuntu.
18
6. Finalize Installation
7. Log In to Ubuntu
In the above image, I am specifying the hardware resources for my virtual machine.
System Configuration
Configuration of User
The first thing in a bid to create a new user in this virtual machine is by executing sudo
useradd amer to mold the user account. The account is developed by the name amer. The
operating system requires the password for the new user using the command sudo passwd amer.
27
The required password will be 258@abc followed by another entry of the same password to
confirm. The installation process will be successful only when the password entered is the one
defined exactly.
(258@abc to mytask)
After we have created user amer successfully, we now shift to alter the password to
another one. This can be achieved using the command passwd in its sudo option. We begin by
opening the terminal and inputting the command sudo passwd amer which prompts us for a new
password. We insert mytask as the new password and then hit Enter. The system makes us
confirm by asking us to re-key the same password, so we re-key mytask and press Enter. When
they are identical, the user amer's password will be changed from 258@abc to mytask. However,
when they are not alike, the system will display a message of discrepancy, and we will have to
repeat the drill with care once again. After being successfully modified, the user amer can now
“This is my project file” in the Info.doc file generated by the commands after having
created a directory called main in the user’s home directory and having changed into that
directory. The tutorials show how to work with files and directories in Linux.
The illustration shows the method to show details from the Info.doc file through the cat
command execution. The displayed output shows that the created file contains the specific text:
"This is my project file." The command execution produced a file that contains the desired
content successfully.
and a file named Location.docx, where pwd is utilized to save the current working directory path.
29
Figure 50: Displaying the contents of Location.docx using the cat Command.
As shown in the image, the file contents of Location.docx with path /home/ubuntu are
viewed using the command cat. This verifies that the current working directory is successfully
As is seen in the image, the user is executing the mkdir -p command to create the
then saves the information into a file called “Time.docx” in the directory created and executes a
command to get the time zone of the system using timedatectl | grep ‘Time zone’.
Figure 52: Displaying Time Zone Information from a File in Linux Terminal.
The screenshot is of a Linux terminal where the user can view the contents of the file by
running cat Time.docx. “Etc/UTC (UTC, +0000)” is the system’s time zone information which is
The user creates a directory called “EVENT” under the above directory using the mkdir -
p command in the Linux terminal displayed. This guarantees that every parent directory exist
caused the user to encounter an error while trying to create a directory and put the hostname into
The hostname “np069653” was present in the Machine.txt file, which the user
The user browsed into NP069653_NP069653, inspected its contents (subdirectories Big
and University), listed directories in their home folder, and tried an unknown command (S).
31
The picture seems to be a directory listing in a terminal screen. The directory “PRO” is
owned by the user “ubuntu,” has certain permissions (`drwxrwxr-x`), and was last modified on
The picture illustrates a terminal screen with the files in a directory. It contains a file
“Location.docx” with rights (-rw-rw-r--) and a subdirectory “BUKITJALIL” with certain rights
(drwxrwxr-x), both of which belong to the user “ubuntu”. The entries in the list take up a total
space of 4 KB.
The photo takes terminal commands to write a file and directory structure. The
commands are to make a nested directory path NP069653_NP069653/Big/Event and to send the
output of the whoami command – presumably what was meant, although whoant is misspelled –
The illustration shows some of the terminal commands used to echo the contents of a file
as well as switch between directories. The user displays the contents of Mine.txt with the string
“ubuntu”, through the use of the cat command following directory change to
NP069653_NP069653/Big/Event.
Shows an incomplete directory tree for /home/ with several access error (e.g., [error
accessing dir]), likely permissions-related. Features case-sensitive directory names (jsltl and
Jsltl), duplicate files (Mine.txt), typical Ubuntu directories (Desktop, Documents), and mixed
33
name usage (e.g., Uni versity with a space). Nustc, nickname/Big/Event, and Machine.txt are
notable items.
A recursive terminal command to alter the permissions of a directory and its files is noted
in the snapshot. Read, write, and execute permissions are given to all users on the directory
University and all subdirectories/files thereof through the command sudo chmod 777 -R
Np069653_NP069653/University.
This command transforms the ownership of the file that resides at main/Info.doc. This
command "sudo chown root:root main/Info.doc" alters ownership and group permissions of the
The image shows a command line for copying one file to a different directory. The
Mine.txt file is copied from the Event folder to the big folder by using the above commands.
34
Configuration of Network
The network interface ens33 serves as the communication gateway for devices by using
Using these commands, users can modify network configuration settings through
administrative privileges.
35
I assigned the new static IP address 192.168.10.4 to the network interface “ens33” by
modifying the Netplan configuration file. I configured the default gateway at 192.168.10.1 and
added DNS servers 8.8.8.8 and 8.8.4.4 under static IP conditions. I disabled DHCP to guarantee
You must use the above command to activate network settings which Netplan yaml
configuration files contain. Users needing root privileges can activate Netplan yaml
The ‘ip a’ command’s output proves that the ‘ens33’ network interface has been correctly
configured with static IP address 192.168.10.4 using subnet mask /24 and broadcast address
192.168.10.255.
Check Routing
The configuration should verify that ‘ens33’ handles local network traffic
(192.168.10.0/24) from 192.168.10.4 but routes external traffic through the default gateway at
192.168.10.1
The above commands change the system’s hostname from np069673 to hemraj-server.
This update ensures that new hostname is reflected across the system, improving identification in
I added the hostname ‘hemraj-server’ to the /etc/hosts file by mapping it to 127.0.1.1 for
local resolution.
I used the /etc/hosts file to link the hostname “hemraj-server” with ip address 127.0.1.1.
Troubleshooting
The error reveals that the Netplan Configuration file permits other users to access it due
to its incorrect permissions. Netplan requires that its configuration files within /etc/netplan
To fix the Netplan permission warning error I used the above commands to assign proper
access permissions to the Netplan configuration file. This command assigns read and write
permissions exclusively to the root user thus eliminating unauthorized access to resolve the
security warning.
39
Firewall Configuration
The command "sudo iptables –L" is used list the current firewall rules (INPUT,
FORWARD, OUTPUT). In the above screenshots, the rules in the INPUT, FORWARD, and
Chain INPUT (policy DROP): The INPUT chain handles the incoming traffic. "policy
DROP" means that, by default, if incoming traffic does not match an explicit rule, it will be
blocked.
Chain FORWARD (policy DROP): The FORWARD chain handles traffic that is routed
Chain OUTPUT (policy ACCEPT): The OUTPUT chain handles outgoing traffic from
the server. "policy ACCEPT" means that outgoing traffic is allowed by default.
The lines with ufw-before-input, ufw-after-input, etc., are rules added by ufw to manage its own
reset.
In the above screenshot, I have allowed the incoming SSH traffic on port 22 and HTTP traffic on
port 80 by using the command "sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT" and "sudo
In the above screenshot, -p tcp defines the protocol to be TCP (22 for SSH and 80 for HTTP), -j
Through the above commands, only the traffic on these ports will be allowed, other traffic will
be blocked.
43
The command is used to allow TCP connections on port 2049. By allowing traffic on this
port, the server will be able to receive NFS requests from clients.
I tried to save the rules in the /etc/iptables/rules.v4 using the command "sudo iptables-
save > /etc/iptables/rules.v4", but I encountered the error "No such file or directory" since I did
The command "sudo apt install iptables-persistent" used for installing the iptables-
persistent package. This package is necessary for saving iptables firewall rules so they are
The command "sudo mkdir –p /etc/iptables" is used to create the directory /etc/iptables.
In this command, sudo ensures that the command is run with root privileges, -p creates parent
45
directory as needed. If /etc exists, but /etc/iptables doesn't exists, it will create both, and
The command "sudo touch /etc/iptables/rules.v4" is used to create an empty file named
I went through this command, since I encountered the error while going through the
save" saves the current iptables rules and the output of this command is piped to the tee
command The tee command, then reads the input and writes it in "/etc/iptables/rules.v4".
The output of this command shows the actual iptables rules that were saved. It includes
the standard chains (INPUT, FORWARD, OUTPUT). The rules show the port 22 (SSH), 80
I am enabling the netfilter-persistent package by using the command "sudo systemctl enable
netfilter-persistent".
The netfilter-persistent service is crucial for ensuring that firewall rules configured using
iptables are loaded automatically when the system restarts. Without it, the firewall rules would be
lost after reboot, which would potentially leave the system protected.
In the above command "sudo iptables-save | sudo tee /etc/iptables/rules.v4 > /dev/null",
the "sudo iptables-save" saves the current iptables rules. Then, the output of this command is
piped to the tee command. The command "sudo tee /etc/iptables/rules.v4" takes input from the
pipe and writes it in /etc/iptables/rules.v4. The ">" is the redirection operator that takes the input
47
from the left and redirects it to the file specified in the right. In the above image, /dev/null
In the above screenshot, the command "cat /etc/iptables/rules.v4" is used to view the
saved firewalls that will be loaded when the system loads. In the above image, it can be seen
clearly that the firewall is configured to allow SSH, HTTP, and NFS traffic.
48
In the above screenshot, the command "sudo apt install nfs-kernel-server" is used to
install the nfs-kernel-server package, which is required to setup an NFS server. The nfs-kernel-
server package provides the necessary utilities to share filesystems over the network using NFS.
In the above screenshot, I have created the "/mnt/nfs_share", which is used as a mount
used to change the owner and group of the /mnt/nfs_share directory to nobody and nogroup
respectively.
The command "sudo chmod 777 /mnt/nfs_share" is used to change the permission of
*(rw,sync,no_subtree_check)" outputs the string defining the NFS share. The tee command
The /etc/exports file's entry point is being set up with this command. This file allows the NFS
server to know which directory to share and which options to use. This line will allow NFS
clients with read and write access to the /mnt/nfs_share directory after the NFS server has been
restarted.
Through the command "sudo exportfs –a", all the directories specified in the /etc/exports
The command "sudo systemctl restart nfs-kernel-server" restarts the nfs-kernel server.
Through the command "sudo ufw allow 2049/tcp", I tried to configure the firewall to
allow NFS traffic, but I faced the error since ufw was not installed in my system.
51
Through the command "sudo apt install ufw", I am installing ufw (uncomplicated
firewall) package which provides user-friendly interface for managing iptables firewall rules.
The command "sudo ufw enable" enables the ufw on the system. The confirmation
message "Firewall is active and enabled on system startup" confirms that firewall is active and
The command "sudo ufw status" is used to check the status of the ufw. This command
displays the list of the allowed connections. It is clear from the status that the ufw firewall is
active.
The command "sudo ufw allow 2049/tcp" configures the ufw to allow incoming TCP
traffic on port 2049. The output of this command "Rule added" confirms that the rule to allow
traffic on port 2049 has been added, and the output of "Rule added (v6) shows that rules have
The command "sudo exportfs –v" is used to verify the NFS exports and their
configuration. The output of this command shows that /mnt/nfs_share directory is being shared
named /mnt/client_nfs, but I was not authorized to do so, since I was not the sudo user.
The command "sudo usermod –aG sudo clientuser" modifies the clientuser to add it to the
sudo group. The command "groups clientuser" displays the group memberships of the user
"clientuser".
/mnt/client_nfs" mounts the NFS share from the server to the client's mount point
/mnt/client_nfs.
The command "ls /mnt/client_nfs" lists the contents of the mounted NFS share. For now,
the output is empty, which means that the shared directory on the NFS server is currently empty,
but the successful mount confirms that the connection between the client and the NFS server has
been established.
55
The command sudo apt-get install easy-rsa will install Easy-RSA on Ubuntu and other
Debian-based systems. "sudo" allows administrative privileges here, apt-get manages packages,
and install easy-rsa will download and install the tool used to create and manage a Public Key
The set of commands enables Easy-RSA to operate as a Public Key Infrastructure control
center. Creating a directory named easy-rsa in the home directory is the first step achieved by
56
executing mkdir ~/easy-rsa. Symbolic links that include all Easy-RSA files appear at this
directory location through the command ln -s /usr/share/easy-rsa/* ~/easy-rsa/. Users need the
command chmod 700 ~/easy-rsa to gain read and write permissions for the easy-rsa directory
since the directory permissions allow access only to the owner. Moving to the ~/easy-rsa
directory with cd ~/easy-rsa enables the system to execute ./easyrsa init-pki for setting up the
The above fig confirms that the Public Key Infrastructure (PKI) has been installed
successfully. It tells us that the pki directory has been built in the ~/easy-rsa directory, where
certificates and keys will reside. The message also suggests next steps that should be taken, i.e.,
The terminal display shows the output of the Easy-RSA tool which functions for
managing Public Key Infrastructure (PKI) certificates. The system generates a Certificate
Authority (CA) certificate through its operation. The user provides an entry for the CA Common
Name followed by a successful confirmation message that stores the generated CA certificate
at /home/ubuntu/easy-rsa/pki/ca.crt.
Easy-RSA produces the certificate authority certificate file ca.crt whose contents the
image presents. The user displays the certificate through the cat command while the content
a Public Key Infrastructure (PKI) the CA certificate functions by verifying while digitally
certificate on a Linux machine. The initial command puts the ca.crt file in a shared directory for
access. The second command updates the system's certificate database (/etc/ssl/certs/), and the
new CA certificate is brought into awareness for secure communication. This allows other
Conclusion
infrastructure with essential services and make key enhancements while developing practical
experience in the fields of user account management and network configuration alongside file
management, security applications, and certificate authority deployment. The team spent time
resolving installation errors, permission issues, and firewall restrictions by working through
system problems to boost their problem-solving abilities. The project provided us with essential
APPENDIX
Workload Matrix
Installation of Ubuntu
of Ubuntu
Documentation, Introduction,
Ubuntu