Ubuntu & Fedora Linux Servers: Virtual Machine File System Project

Verified

Added on  2023/03/21

|23
|1749
|97
Practical Assignment
AI Summary
This assignment provides a comprehensive guide to configuring two virtual machines, one running Ubuntu Server and the other running Fedora Server, to offer various services. The Ubuntu Server is configured as a private DNS and SSH server, detailing the installation and configuration of Bind9, setting up IPv4 mode, creating ACL blocks, and configuring forward and reverse zones. The Fedora Server is set up with Apache, MySQL, and PHP to function as a web and database server, including testing the services and configuring Netplan. The assignment also covers remote file access using both secure (SFTP) and unsecure (FTP) methods, providing step-by-step instructions for installation and configuration. Finally, it explains how to set up simple web services on the Fedora VM, including configuring the Bind server and necessary firewall permissions, enabling access to a sample website. Desklib offers this and many more solved assignments for students.
Document Page
Running head: LINUX File System
LINUX File System
Name of the Student:
Name of the University:
Author Note:
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
1LINUX File System
Table of Contents
Part 1: Virtual Machine One (Ubuntu) – DNS & SSH Server...................................................2
Part 2: Virtual Machine Two (Fedora) - Web and Database servers........................................5
Part 3: : Remote File Access......................................................................................................6
Part 4: Simple Web Services......................................................................................................8
References................................................................................................................................12
Document Page
2LINUX File System
Part 1: Virtual Machine One (Ubuntu) – DNS & SSH Server
In this part, the first virtual machine is configured to use bind to configure it as a private DNS
virtual server. Here, first the Ubuntu server 18.04 is installed in the VMware virtual machine.
The ip address of the server is chosen by modifying the existing ip address of the VM by
seeing it via ifconfig command. The following steps are performed:
1. Bind is installed via: sudo apt-get install bind9 bind9utils bind9-doc
2. The next step is to configure the bind to set it in ipv4 mode by this command:
sudo nano /etc/default/bind9
And then add "-4" to the end of the OPTIONS parameter. The result is as follows:
OPTIONS="-u bind -4"
3. The next step is to restart bind to implement changes via
sudo systemctl restart bind9
Document Page
3LINUX File System
4. Now it’s time to configure the main DNS server that is VM1. Open the
named.conf.options file using: sudo nano /etc/bind/named.conf.options
5. Create a new ACL block and add the details about the primary IP address and the host
IP address.
6. After creating the ACL block, edit the options block below and add:
options {
directory "/var/cache/bind";
recursion yes; # enables resursive queries
allow-recursion { trusted; }; # allows recursive queries from "trusted"
clients
listen-on { ip address; }; # ns1 private IP address - listen on private
network only
allow-transfer { none; }; # disable zone transfers by default
forwarders {
8.8.8.8;
8.8.4.4;
};
Save the file and exit using CTRL + O and CTRL + X.
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
4LINUX File System
7. Next its time to configure the local file. Open named.conf.local file for edit using:
sudo nano /etc/bind/named.conf.local
Add the following lines in the file:
zone "shekhda.net.au" {
type master;
file "/etc/bind/zones/db.nyc3.example.com"; # zone file path
allow-transfer { ip address; }; # ns2 private IP address - secondary
};
Add these lines too:
zone "128.10.in-addr.arpa" {
type master;
file "/etc/bind/zones/db.10.128"; # 10.128.0.0/16 subnet //assumed
allow-transfer { ip address; }; # ns2 private IP address - secondary
};
Document Page
5LINUX File System
Save the file and exit.
8. Create the forward zone as shown below:
Create this directory by: sudo mkdir /etc/bind/zones
Copy the db file using this command:
sudo cp /etc/bind/db.local /etc/bind/zones/db. shekhda.net.au
Edit the file by opening it via:
sudo nano /etc/bind/zones/ db. shekhda.net.au
Make the necessary changes so that it looks like this:
$TTL 604800
@ IN SOA ns1. shekhda.net.au. admin. shekhda.net.au. (
3 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
; name servers - NS records
IN NS ns1.nyc3.example.com.
Document Page
6LINUX File System
IN NS ns2.nyc3.example.com.
; name servers - A records
ns1. shekhda.net.au. IN A server ip address
; 10.128.0.0/16 - A records
host1. shekhda.net.au. IN A host ip address
9. Create the reverse zone file in the following way:
sudo cp /etc/bind/db.127 /etc/bind/zones/db.10.128
sudo nano /etc/bind/zones/db.10.128
Make the necessary changes until it looks like this:
$TTL 604800
@ IN SOA shekhda.net.au. admin. shekhda.net.au. (
3 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
; name servers
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
7LINUX File System
IN NS ns1. shekhda.net.au.
; PTR Records
11.10 IN PTR ns1. shekhda.net.au. ; server ip
101.100 IN PTR host1. shekhda.net.au. ; host ip
10. After saving and exiting all the files check for bind errors using:
sudo named-checkconf
Correct all the errors reported and run the command again.
Restart the bind server:
sudo systemctl restart bind9
Allow firewall access to bind DNS server using ufw:
sudo ufw allow Bind9
Document Page
8LINUX File System
The DNS server has successfully been configured. Install ssh if it is not preinstalled.
Part 2: Virtual Machine Two (Fedora) - Web and Database servers
1. Install the Apache server, My SQL and PHP(preinstalled) using the following
commands:
For apache server:
sudo apt-get install apache2
Document Page
9LINUX File System
For My sql server:
sudo apt-get install mysql-server
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
10LINUX File System
Start mysql server:
Document Page
11LINUX File System
For php:
sudo apt-get install php libapache2-mod-php
chevron_up_icon
1 out of 23
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]