-9%

New Sol: web 375 web375 web/375 entire course help – devry university

$92.99$102.00

web 375 web375 web/375 entire course help – devry university

  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux

Course Description: WEB375 Web Architecture

WEB375 Lab 7 Configure iptables in Linux

The purpose of this iLab is to configure an iptables firewall in Linux. Use the IP addresses that exist when you start Linux.
Virtual Machine Login Information for PLABFED01 and PLABFED02
Username: Student
Password: Password
Username: root
Password: Password

Description

web 375 web375 web/375 entire course help – devry university

  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux
  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux

Course Description: WEB375 Web Architecture

WEB375 Lab 7 Configure iptables in Linux

The purpose of this iLab is to configure an iptables firewall in Linux. Use the IP addresses that exist when you start Linux.
Virtual Machine Login Information for PLABFED01 and PLABFED02
Username: Student
Password: Password
Username: root
Password: Password

Lab Diagram
During your session, you will have access to the following lab configuration.
WINCONSOLE PLABFED01 PLABFED02
The Linux servers also connect to a private network. The IP address of PLABFED01 is 192.168.240.11 and. The IP address of PLABFED01 is 192.168.240.12.

Connecting to your iLab
In this module, you will be working on the following equipment to carry out the steps defined in each exercise.

  • WINCONSOLE (Management Server)
  • PLABFED01 (Linux Server)
  • PLABFED02 (Linux Server)

Each exercise will detail which console you are required to work on to carry out the steps.
To start simply click on the named Server from the device list (located on the left hand side of the screen) and click the “Power on” button from the Tools bar. In some cases, the devices may power on automatically.
During the boot-up process, an activity indicator will be displayed in the Name tab.

  • Black—Powered off
  • Orange—Working on your request
  • Green—Ready to access

If the remote console is not displayed automatically in the main window (or pop-up), click the Connect icon located in the Tools bar to start your session.
If the remote console does not appear, please try the following option.

  • Switch between the HTML 5 and Java client versions in the Tools bar.

In the event this does not resolve your connectivity problems, please visit our Help and Support pages for additional resolution options.
iptables Firewall Configuration Step by Step
General information
This Linux-based firewall is controlled by two programs.

  • iptables handles filtering for IPv4
  • ip6tables handles filtering for IPv6

IPTables main files are as follows.

  • /etc/sysconfig/iptables—where rule sets are saved
  • /sbin/iptables—binary
  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux

At present, there are four total chains.

  • INPUT: default chain originating to system
  • OUTPUT: default chain generating from system
  • FORWARD: default chain packets sent through another interface
  • RH-Firewall 1-INPUT: the user-defined custom chain

Packet-Matching Rules

  • Each packet starts at the first rule in the chain.
  • A packet proceeds until it matches a rule.
  • If a match is found, then control will jump to the specified target (such as REJECT, ACCEPT, or DROP).

Target Meanings

  • The target ACCEPT means to allow the packet.
  • The target REJECT means to drop the packet and send an error message to remote host.
  • The target DROP means to drop the packet and not send an error message to the remote host or sending host.

TASK A: Configure iptables Firewall
We are going to configure the iptables. Log in to the PLABFED01 as root and type the following commands.
Note: The # symbol before each command is the prompt of the root account. Do not type it.

Step 1: To use the iptables service, disable firewalld by typing the following commands.
#systemctl disable firewalld
#systemctl stop firewalld

Step 2: Make sure to install iptables by typing the following commands.
#yum -y install iptables-services
#rpm –q iptables

Step 3: To install the system-config-firewall tool, type the following commands.
#yum -y install system-config-firewall

Step 4: To execute the system-config-firewall tool, type the following command.
#system-config-firewall

  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux

A Firewall Configuration window will pop up.

  1. Click the Wizard button on the top left corner.
  2. Leave the “Information” page and click on Forward.
  3. For Firewall Setting, keep the default “system with network access” and click on Forward.
  4. For user skill level, keep the default “Beginner” and click on Forward.
  5. For Configuration, select Load “Server” configuration and click on OK, then click the Apply button on the top left corner and click on YES.
  6. Click on X to close the firewall configuration.

To make sure that the rules set was set up, type the following command.
#ls /etc/sysconfig/iptables
If it says, “No such file or directory,” you have to execute the system-config-firewall tool in Step 4 again.
The file /etc/sysconfig/iptables is the default rule set.

Step 5: To turn on the firewall, type the following commands.
#systemctl start iptables
#systemctl enable iptables

Step 6: To check the status of the firewall, type the following command.
#systemctl status iptables
Note:The below commands are for reference.

  • To start the firewall, type the following command.
    #systemctl start iptables
  • To restart the firewall, type the following command.
    #systemctl restart iptables
  • To stop the firewall, type the following command.
    #systemctl stop iptables
  • To check status of the firewall, type the following command.
    #systemctl status iptables
  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux

BUY ORIGINAL SOLUTION HERE

TASK B: Practice Manipulating iptables
We are still logged in to the PLABFED01 as root, so type the following commands and observe the outputs.
Step 1: To display default rules with line numbers type the following command.
#iptables –line-numbers -n -L
Note: You can use line numbers to delete or insert new rules into the firewall.

Step 2: To display the status of the firewall, type the following command.
#iptables -L -n -v
Where -L: List rules
-v: Display detailed information
-n: Display IP address and port in numeric format

Step 3: To display INPUT or OUTPUT chain rules, type the following commands.
#iptables -L INPUT -n -v
#iptables -L OUTPUT -n -v –line-numbers

Step 4: You can use the iptables command itself to stop the firewall and delete all rules.
#iptables -F
#iptables -X
Where: -F: Deleting (flushing) all the rules
-X: Delete chain

Step 5: To delete a rule on line 4 and verify it, type the following commands.
#iptables –line-numbers -n -L
#iptables -D INPUT 4
#iptables –line-numbers -n -L

Step 6: To insert rule between 1 and 2, type the following commands.
#iptables -I INPUT 2 -s 202.54.1.2 -j DROP
#iptables –line-numbers -n -L

Step 7: To block an attacker’s IP address called 1.2.3.4, type the following commands.
#iptables -A INPUT -s 1.2.3.4 -j DROP
#iptables –line-numbers -n -L

Step 8: You can use the iptables command itself to stop the firewall and delete all the rules.
#iptables -F
Where -F: Deleting (flushing) all the rules
#iptables –line-numbers -n -L

Step 9: To stop the firewall, type the following command.
#systemctl stop iptables

Step 10: To restore firewall rules from the file /etc/sysconfig/iptables, type:
#systemctl restart iptables

Step 11: To save firewall rules in /etc/sysconfig/iptables, type the following command.
#iptables-save
Note 1): In this case, we did not add more rules because with the restart of iptables, the content of the file /etc/sysconfig/iptables does not change.
Note 2): If the file /etc/sysconfig/iptables is corrupted, just redo the TASK A Step 4, which will generate a new default rule file.
Note 3): To see more details on iptables’ options, type “man iptables.”

TASK C: Experiment Rules
These lab scenarios are focusing on using iptables to improve the security of PLABFED01 Linux server. We use the PLABFED02 Linux server for testing. This part of the lab will require you to switch back and forth between two Linux systems. So log in to each system, open a terminal window, and switch user to root. From there, you can use the mouse to select a system. See the example below.

Step 1: On PLABFED01: To restore the default firewall rules (restart), type the following command.
#systemctl restart iptables
The below is the listing of the default iptables rule set.

Step 2: On PLABFED01: Look at the INPUT chain; the rule on line 4 accepts the telnet connections.

  • Your task is to delete line 4 and display the list of iptables with line numbers.
  • Capture the Linux desktop and save this image to your Lab Report document in the space allocated for the modified rule set.

Step 3: On PLABFED02: Check whether telnet connections to PLABFED01 are possible.

  • From PLABFED02 telnet to PLABFED01 and logon as Student with the password Password.
  • Capture the Linux desktop and save this image to your Lab Report document in the space allocated for the telnet session from PLABFED2.

Step 4: On PLABFED01: We want to set up the iptables to reject telnet connections.

  • Your task is to flush (delete) all the rules, add the following rule, and display the list of iptables.
    #iptables –A INPUT –p tcp –-dport 23 –j DROP
  • Capture the Linux desktop and save this image to your Lab Report document in the space allocated for the modified rule set.

Step 5: On PLABFED02: Check whether telnet connections to PLABFED01 are still possible.

  • From PLABFED02, telnet to PLABFED01 and log in as Student with the password Password.
  • Capture the Linux desktop and save this image to your Lab Report document in the space allocated for the telnet session from PLABFED2.

This concludes iLab 7.

WEB 375 WEB375 WEB/375 ENTIRE COURSE HELP – DEVRY UNIVERSITY

  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux

WEB375 Lab 6 Configure a MySQL Server in Linux

The purpose of this lab is to configure MySQL server in Linux. Use the IP addresses that exist when you start Linux.
Virtual Machine Login Information for PLABFED01 and PLABFED02
Username: Student
Password: Password
Username: root
Password: Password

Lab Diagram
During your session you will have access to the following lab configuration.
WINCONSOLE PLABFED01 PLABFED02
The Linux servers also connect to a private network. The IP address of PLABFED01 is 192.168.240.11 and the IP address of PLABFED01 is 192.168.240.12.

Connecting to Your Lab
In this module, you will be working on the following equipment to carry out the steps defined in each exercise.

  • WINCONSOLE (Management Server)
  • PLABFED01 (Linux Server)
  • PLABFED02 (Linux Server)

Each exercise will detail which console you are required to work on in order to carry out the steps.
To start, simply click on the named server from the device list (located on the left hand side of the screen) and click the Power on from the Tools bar. In some cases the devices may power on automatically.
During the boot up process, an activity indicator will be displayed in the Name tab:

  • Black – Powered Off
  • Orange – Working on your request
  • Green – Ready to access

If the remote console is not displayed automatically in the main window (or popup), click the Connect icon located in the Tools bar to start your session.
If the remote console does not appear, please try the following option:

  • Switch between the HTML 5 and Java client versions in the Tools bar.

In the event this does not resolve your connectivity problems, please visit our Help / Support pages for additional resolution options.

  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux

TASK A – General Background Information
This Lab shows the basic steps of configuring a MySQL server and creates a simple database.
The steps to do this include:

  • Install and start MySQL.
  • Create a MySQL “root” user.
  • Secure the MYSQL installation.
  • Create your application’s database.
  • Create your database’s data tables.
  • Perform a basic query from the database.

TASK B – Configure Basic Settings for MySQL Step-By-Step
We start by setting up a basic MySQL server. As always when doing any type of system administration, we need to perform them using root account. Use Putty to logon plabfed01 as root.

Step 1: To stop all firewalls or security features, type the following commands:
#systemctl stop firewalld
#systemctl stop iptables

Step 2: Make sure the MySQL packages are installed. You should be able to discover this with the following command:
If it tells you that mariadb is not installed, to install it type:
#yum –y install mysql mysql-server

Step 2: To start the mysqld service, type:
#systemctl start mysqld

Step 3: To check the mysqld status, type:
#systemctl status mysqld
An active mysqld status looks like this:
Note: You can check for errors using command journalctl –xn. Below is a sample of journalctl –xn command output without any error.

Step 4: MySQL Secure Installation performs the following:

  • Set (change) root password
  • Remove anonymous users
  • Disallow root login remotely
  • Remove test database and access to it
  • Reload privilege tables

To secure the MYSQL installation, type:
#/usr/bin/mysql_secure_installation
The prompt will ask you for your current root password, so leave it blank by pressing Enter.
The prompt will next ask you if you want to set a root password. Choose “Y” and follow the instructions. Use the root password Password.
Fedora automates the process of setting up MySQL, asking you a series of yes or no questions. Say “yes” to all the options, or press Enter since “yes” is the default selection. At the end, MySQL will reload and implement the new changes.

Step 5: Connect to MySQL database (localhost) with password:
# mysql -u root -p
Note: The -p will make it prompt you for a password.
The root password is Password.

Step 6: To exit MySQL database, type:

TASK C – Create Your First SQL Server Database in Three Quick Steps
Connect to MySQL database (localhost) with password using command mysql -u root -p

Step 1: Create database
To create a new database called Your_First_Name_DB (i.e. MelissaDB), type the following statement and press Enter :
Note: Mine is called MyFirstDB; yours should be named differently.
Note: The statement is ended with the ; (semi colon)

Step 2: To use the new database, type the following command and press Enter:

Step 3: Create new table
To create an Employees table to hold data, type the following command and press Enter:

Step 4: Enter data
To enter data into the Employees table, type the following statements:

Step 5: View data and exit MySQL
Execute the following statements:

TASK D – Lab Report Preparation
Step 1: Be sure in root account. Clear the screen and type the command #systemctl status mysqld to display the mysqld status and capture the Linux desktop. Save this image to your Lab Report document in the space allocated for the #systemctl status mysqld command.

Step 2: Be sure in root account. Clear the screen and use the command #mysql –u root -p file to logon to the mysql database as root and capture the Linux desktop. Save this image to your Lab Report document in the space allocated for the #mysql –u root -p command.

Step 3: Use the statement show databases; to display the list of current databases showing Your_First_Name_DB database, and capture the Linux desktop. Save this image to your Lab Report document in the space allocated for the show databases; statement.

Step 4: Use the statements USE and SELECT to view the table’s content of the Your_First_Name_DB database and capture the Linux desktop. Save this image to your Lab Report document in the space allocated for the SELECT statement.
This concludes the Week 6 Lab.

WEB 375 WEB375 WEB/375 ENTIRE COURSE HELP – DEVRY UNIVERSITY

  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux

WEB375 Lab 5 Configure HTTP Server in Linux

The purpose of this Lab is to configure an Apache web server in Linux. Use the IP addresses that exist when you start Linux.
Virtual Machine Login Information for PLABFED01 and PLABFED02
Username: Student
Password: Password
Username: root
Password: Password

Lab Diagram
During your session, you will have access to the following Lab configuration.
WINCONSOLE PLABFED01 PLABFED02
The Linux servers also connect to a private network. The IP address of PLABFED01 is 192.168.240.11 and the IP address of PLABFED01 is 192.168.240.12.
Connecting to Your Lab
In this module, you will be working on the following equipment to carry out the steps defined in each exercise.

  • WINCONSOLE (Management Server)
  • PLABFED01 (Linux Server)
  • PLABFED02 (Linux Server)

Each exercise will detail which console you are required to work on in order to carry out the steps.
To start, simply click on the named server from the device list (located on the left hand side of the screen) and click the Power on from the Tools bar. In some cases, the devices may power on automatically.
During the boot up process, an activity indicator will be displayed in the Name tab:

  • Black – Powered Off
  • Orange – Working on your request
  • Green – Ready to access

If the remote console is not displayed automatically in the main window (or popup), click the Connect icon located in the Tools bar to start your session.
If the remote console does not appear please try the following option:

  • Switch between the HTML 5 and Java client versions in the tools bar.

In the event this does not resolve your connectivity problems, please visit our Help / Support pages for additional resolution options.

TASK A – Read General Background Information on HTTP Server
This is the background information to help you do your lab. Read this to get a general understanding of how to configure an HTTP server.
Apache Web Server Overview
What Is a Web Server?
A web server uses the Hypertext Transfer Protocol (HTTP) to communicate or distribute static or dynamic information from a central computer. In addition, many web servers also:

  • send descriptive information about the requested resource (e.g., mime type) instructing the client how to interpret or format the resource.
  • perform user authentication and data encryption to permit online business transactions
  • provide database access on behalf of the client, eliminating the need for the client to use a client-side application to do the work.
  • send appropriate error messages.

What is Apache?
The most popular web server on the Internet is Apache; it is open source. Apache is stable, relatively secure, and can be customized with added functionality with dynamic modules loaded on the fly when they are needed.
Become Familiar with Apache Files
The root directory of the web server is /etc/httpd, which is divided into three parts:

  • /etc/httpd/conf (where configuration files stay)
  • /etc/httpd/logs (where the logs of the web server are, and site accessing stay)
  • /etc/httpd/modules (where the module stays)

The main file, httpd.conf, is used to configure a web server. It contains the configuration directives that give the server its instructions. The configuration directives are grouped into three basic sections:

  1. Directives that control the operation of the Apache server process as a whole (the ‘global environment’).
  2. Directives that define the parameters of the main or default server, which respond to requests that are not handled by a virtual host. These directives also provide default values for the settings of all virtual hosts.
  3. Settings for virtual hosts, which allow Web requests to be sent to different IP addresses or host names, and have them handled by the same Apache server process.

The following table lists some directives and their meaning:
ServerRoot The server installation / configuration location
ScoreBoardFile Where the Apache server stores some of its own process information
Port Which port the server listens on
ServerAdmin Administrator’s E-mail address
ServerName Host name / IP address of the machine running the server
DocumentRoot This is the location where your HTML documents are stored
DirectoryIndex List of HTML document file names
ServerType Select “standalone” or via xinetd
LoadModule To load the specified module

TASK B – Configure Basic Settings For The Web Server Step-By-Step
We start setting up a basic HTTP server. As always when doing any type of system administration, we need to perform them using root account. Use Putty to logon plabfed01 as root.

Step 1: To stop all firewalls or security features, type the following commands:
#systemctl stop firewalld
#systemctl stop iptables

Step 2: Make sure Apache is installed by typing the following from a terminal window:
If it did not show as the above outputs, you need to install them. To install Apache on an Fedora 20 system type:
#yum –y install httpd

Step 3:
Now that the Apache packages are installed, we need to set the name of the web server to match with the name of the computer. Edit /etc/httpd/conf/httpd.conf, search for the line containing ‘ServerName localhost” (line number 95), and delete the # from the beginning of the line, and add 192.168.240.11. It should look like this:
Note:

  • To make it available on the LAN, replace localhost with your IP address.
  • In a real setup, we would use the computer name defined in the DNS server (e.g., www.cnn.com).
  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux

Step 4: Start the Apache web server by typing:
#systemctl start httpd
Note: If you change your configuration file, the changes will take effect with the command:
#systemctl restart httpd
You can stop the service with this command:
#systemctl stop httpd
You can show the service status with this command:
#systemctl status httpd

Step 5: To check httpd status type:
#systemctl status httpd
An active httpd status looks like this:
Screenshot # 1
Clear the screen and type this command: systemctl status httpd. Capture the Skillsoft desktop and paste it into your Lab Report document.

Step 6: You are done with the setup.
If httpd fails starting, check for errors using command journalctl –xn, fix any typo in the /etc/httpd/conf/httpd.conf file, and restart the service with command #systemctl restart httpd until vsftpd starts successfully. Below is a sample of journalctl –xn command output without any error.

Step 7: To enable the vsftp server during boot, type the following command:
#systemctl enable httpd

TASK C –Validate and Test Web Server
Now we need to have two TigerVNC sessions, one logon on plabfed01 and the other on plabfed02

  • Use TigerVNC to logon plabfed01 as root.
  • Use TigerVNC to logon plabfed02 as root.

Note: Type 1 to logon as Student, and 2 to logon as root.
Arrange the VNC windows so we can switch back and forth easily by moving the cursor to the desired screen and right click. See below screenshot:
Note: Press the ESC key to bring back the active screen.

Step 1: We are using a text browser called links to display a web page. To install it on both systems, plabfed01and plabfed02, type the command:
#yum –y install links

Step 2: On the web server (plabfed01), create a simple web page and save it as index.html in your DocumentRoot directory:

  • cd /var/www/html
  • vi index.html

Enter the following text:

Apache is cool!!!
This message is from your_name_here.
Your index.html file’s contents look like this:

Step 3: On the web client plabfed02, display the web page from the web server plabfed01 using the text browser links. Type the command as follows:
A sample text-based web page appears as follows:
Note: To open another terminal from links click on file then select “Open terminal”.
Screenshot # 2
Capture the Skillsoft desktop showing the content of the web page similar to the above screenshot, and paste it into your Lab Report document.

TASK D – Configure Virtual Hosting
In this part of the Lab, we will host two websites, www.papa.com and www.mama.com to the apache web server. Go to the plabfed01 server and login as root.

Step 1: For each website, create a DocumentRoot directory and an index page as seen below:
Use vi or nano to edit the index.html for papa.com and mama.com sites with the content below:
Screenshot # 3
Clear the screen and use cat to display the contents of the /var/www/virtual/www.mama.com/html/index.html file. Capture the Skillsoft desktop and paste it into your Lab Report document.

Step 2: Update the /etc/hosts file with the content below:

Step 3:
Use vi or nano to create the virtual configuration file /etc/httpd/conf.d/papamama.conf of apache server. The content looks like this:

Step 4: To check the syntax of the file, and before restarting the web server, type:

Step 5: To restart the HTTPD web server type:

TASK E –Test Virtual Hosting
Now we use Putty to logon plabfed01 as root to perform the testing.

  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux

Step 1: On the plabfed01 web server, display the www.papa.com web page using the text browser links. Type the command as follows:
A sample text-based web page appears as follows:
Note: To exit from Links, click on the top of the page and the Tool bar will appear. Click on File, then Exit.
Screenshot # 4
Capture the Skillsoft desktop showing the content of the papa.com web page similar to the above screenshot, and paste it into your Lab Report document.

Step 2: On the plabfed01 web server, display the www.mama.com web page using the text browser links. Type the command as follows:
A sample text-based web page appears as follows:
This concludes the Week 5 Lab.

WEB 375 WEB375 WEB/375 ENTIRE COURSE HELP – DEVRY UNIVERSITY

  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux

WEB375 Lab 4 Configure a vsftp Server in Linux

The purpose of this Lab is to configure the vsftp server in Linux. Use the IP addresses that exist when you start Linux.
Virtual Machine Login Information for PLABFED01 and PLABFED02
Username: Student
Password: Password
Username: root
Password: Password

Lab Diagram
During your session you will have access to the following lab configuration.
WINCONSOLE PLABFED01 PLABFED02
The Linux servers also connect to a private network. The IP address of PLABFED01 is 192.168.240.11 and the IP address of PLABFED01 is 192.168.240.12.

Connecting to Your Lab
In this module you will be working on the following equipment to carry out the steps defined in each exercise.

  • WINCONSOLE (Management Server)
  • PLABFED01 (Linux Server)
  • PLABFED02 (Linux Server)

Each exercise will detail which console you are required to work on to carry out the steps.
To start, simply click on the named server from the device list (located on the left hand side of the screen) and click the Power on from the Tools bar. In some cases, the devices may power on automatically.
During the boot up process, an activity indicator will be displayed in the Name tab:

  • Black – Powered Off
  • Orange – Working on your request
  • Green – Ready to access

If the remote console is not displayed automatically in the main window (or popup) click the Connect icon located in the tools bar to start your session.
If the remote console does not appear, please try the following option:

  • Switch between the HTML 5 and Java client versions in the Tools bar.

In the event this does not resolve your connectivity problems, please visit our Help / Support pages for additional resolution options.

TASK A – Read General Background Information on vsftp server:
This is the background information to help you do your Lab. Read this to get a general understanding of how to configure a vsftp server.

  • File Transfer Protocol (FTP) is a client/server protocol for sharing files between machines over a TCP/IP network. This Lab covers the popular vsftp program that comes standard with Fedora 20.
  • There are two kinds of FTP logins that vsftp provides:
    – anonymous FTP – login with the username ‘anonymous’
    – real FTP – login with a real username and password.

Become Familiar with vsftp Files
Setting up the server will be done in two steps: Setting up the configuration files for vsftp, and then starting the vsftp services.

  1. Setting Up the Configuration Files
    There are three main configuration files you will need to edit to set up a vsftpd server:

    • /etc/vsftpd/vsftpd.conf
    • /etc/hosts.allow
    • /etc/hosts.deny
    1. /etc/vsftpd/vsftpd.conf file: This file contains a list of directives that control the behaviors of each user. Below are directives summary tables.
      Real Users vsftp Control Settings
      local_enable=YES Allow any real user FTP access
      userlist_enable=YES Enable the denied access list
      write_enable=YES Enable any form of FTP write command
      local_umask=022 Unmask for local users
      Anonymous Users vsftp Control Settings
      anonymous_enable=YES Allow anonymous FTP
      anon_upload_enable=YES Allow the anonymous FTP user to upload files
      anon_unmask=022 Control the permissions of upload files
      anon_other_write_enable=YES Allow anonymous users to rename or delete any files
      anon_mkdir_write_enable=YES Allow anonymous users to create their own directories
      ASCII Enable Settings
      ascii_download_enable=YES Allow download in ASCII mode
      ascii_upload_enable=YES Allow upload in ASCII mode
      Logging vsftpd Activities
      xferlog_enable=YES Activate logging of uploads/downloads
      xferlog_file=/var/log/vsftpd.log You may override where the log file goes if you like
    2. /etc/hosts.allow and /etc/hosts.deny
      These two files specify which computers on the network can use services on your machine. Each line of the file contains a single entry listing a service and a set of machines.
      When the server gets a request from a machine, it first checks hosts.allow, then checks hosts.deny. It denies access to the matched entries in hosts.deny except the matched entries listed in hosts.allow.
    • /etc/hosts.deny

    To denying everybody:
    vsftpd:ALL

    • /etc/hosts.allow

    To allow access from local host:
    vsftpd: 127.0.0.1
    To allow access from everybody on the 192.168.1.0/24 subnet:
    vsftpd: 192.168.1.
    To allow access from two specific addresses:
    vsftpd: 192.168.1.100 192.168.5.53
    To allow access to everybody:
    vsftpd: ALL

  2. Starting the vsftp Services
    #systemctl start svsftpd
    Note: How to stop, start, and restart vsftpd:
    Command Description
    #systemctl stop vsftpd stop vsftpd
    #systemctl start vsftpd start vsftpd
    #systemctl restart vsftpd restart
    #systemctl status vsftpd Show status

TASK B – Configure Basic Settings for vsftpd Step-By-Step
We start setting up a basic vsftp server. As always when doing any type of system administration, we need to perform them using root account. Use Putty to logon plabfed01 as root.

Step 1: To stop all firewalls or security features, type the following commands:
#systemctl stop firewalld
#systemctl stop iptables
#setsebool -P ftp_home_dir=1

Step 2: Make sure the vsftpd packages are installed. You should be able to discover this with the following command:
#rpm -q vsftpd
If it tells you that vsftpd is not installed, to install it type:
#yum –y install vsftpd

Step 3: The file /etc/vsftpd/vsftpd.conf controls the configuration of vsftp. Use the nano or vi editor to remove the # symbol before each directive (if they are not already done) and set it to YES or NO. We only go over some directives below so you understand how to customize it, and leave the others at the default setup.
#nano /etc/vsftpd/vsftpd.conf

  • To disable access to your vsftpd server for anonymous users, change the directive as seen below:
    Note: To enable the above feature, set anonymous_enable=YES.
  • To allow any user with real user accounts on your system to access the vsftp server, change the directive as seen below:
  • To allow real user write access, so that they can upload material and modify content:
  • All user accounts listed in the file /etc/vsftpd/user_list are denied access. The following line
    in the /etc/vsftpd/vsftpd.conf activates that list.

Check the /etc/vsftpd/user_list file to see which users are denied access to the vsftpd server.
Below is a partial list of the /etc/vsftpd/vsftpd.conf file.
Note: Lines preceded by the # symbol are comments.

Step 4: After modifying the /etc/vsftpd/vsftpd.conf file, start the vsftpd service.
#systemctl start vsftpd
Note: If the file /etc/vsftpd/vsftpd.conf is modified, in order to make it effective, you need to restart the vsftpd.

Step 5: To check vsftpd status type:
#systemctl status vsftpd
An active vsftpd status looks like this:
Note: If vsftpd fails to start, check for errors using command journalctl –xn, fix any typo in the /etc/vsftpd/vsftpd.conf file, and restart the service with command #systemctl restart vsftpd until vsftpd starts successfully.
Below is a sample of journalctl –xn command output without any error.

Step 6: To enable the vsftp server during boot, type the following command:
#systemctl enable vsftpd.service

TASK C –Validation and Testing
Now we need to have two Putty sessions, one logon plabfed01 and the other on plabfed02

  • Use Putty to logon plabfed01 as root.
  • Use Putty to logon plabfed02 as root.

Arrange the terminal so we can switch back and forth easily. See the screenshot below:

Step 1: Create a user account on plabfed01 (vsftp server) using these commands with the password Password:
#useradd usera
#passwd usera

Step 2: Create a user account on plabfed02 (ftp client) using these commands with the password Password:
#useradd userb
#passwd userb

Step 3: Create a test file on plabfed01: Logon to usera on plabfed01 by using su – usera and create a file called hello (use nano hello) with the message “This message is from userA” and save it.

Step 4: Create a test file on plabfed02: Logon to userb on plabfed02 by using su – userb and create a file called hello (use nano hi) with the message “This message is from userB” and save it.
See the screenshot below:

Step 5: We are going to use vsftp to upload the file “hi” from the userb account on plabfed02 (ftp client) to usera account plabfed01 (vsftp server). The resulting screenshot should look like this:

Step 6: We are going to use vsftp to download the file “hello” from the usera account on plabfed01 (vsftp server) to userb account plabfed02 (ftp client). The resulting screenshot should look like this:

Step 7: We are going to test if the anonymous FTP logon worked. It should fail since we disabled anonymous logon. We do this from the userb account on plabfed02. The resulting screenshot should look like this:

TASK D – Lab Report Preparation
Step 1: Be sure in root account on plabfed01. Clear the screen and use the command #tail -4 /etc/passwd file to display its last four lines and capture the Linux desktop. Save this image to your Lab Report document in the space allocated for the #tail -4 /etc/passwd command.

Step 2: Be sure in userb account on plabfed02. Clear the screen, type the command #cat hi to display its contents and capture the Linux desktop. Save this image to your Lab Report document in the space allocated for the hi file.

Step 3: Be sure in root account on plabfed01. Clear the screen and type the command #systemctl status vsftpd to display the vsftpd daemon status and capture the Linux desktop. Save this image to your Lab Report document in the space allocated for the #systemctl status vsftpd command.

Step 4: Be sure in userb account on plabfed02. Clear the screen, then FTP to 192.168.240.11 and logon as usera. Capture the Linux desktop and save this image to your Lab Report document in the space allocated for FTP and logon as usera.

Step 5: Be sure in userb account on plabfed02. Clear the screen, then FTP to 192.168.240.11 and logon as anonymous. Capture the Linux desktop and save this image to your Lab Report document in the space allocated for FTP and logon as anonymous.

Step 6: Configure vsftp allowing anonymous login and test it.

  • Be sure in root account on plabfed01. Configure the vsftp to allow anonymous login.
  • Be sure in userb account on plabfed02. Clear the screen, then FTP to 192.168.240.11 and logon as anonymous. Capture the Linux desktop and save this image to your Lab Report document in the space allocated for FTP and logon as anonymous.

Step 7: Configure vsftp to only disallow usera login and test it.

  • Be sure in root account on plabfed01. Configure the vsftp to only disallow usera login.
  • Be sure in userb account on plabfed02. Clear the screen then FTP to 192.168.240.11 and logon as usera. Capture the Linux desktop and save this image to your Lab Report document in the space allocated for FTP and logon as usera.

This concludes Lab 4.

WEB 375 WEB375 WEB/375 ENTIRE COURSE HELP – DEVRY UNIVERSITY

  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux

WEB375 Lab 3 Configure a Sendmail Server in Linux

The purpose of this lab is to configure a sendmail server in Linux. Use the IP addresses that exist when you start Linux.
Virtual Machine Login Information for PLABFED01 and PLABFED02
Username: Student
Password: Password
Username: root
Password: Password

Lab Diagram
During your session, you will have access to the following lab configuration.
WINCONSOLE PLABFED01 PLABFED02
The Linux servers also connect to a private network. The IP address of PLABFED01 is 192.168.240.11 and the IP address of PLABFED01 is 192.168.240.12.

Connecting to Your Lab
In this module, you will be working on the following equipment to carry out the steps defined in each exercise.

  • WINCONSOLE (Management Server)
  • PLABFED01 (Linux Server)
  • PLABFED02 (Linux Server)

Each exercise will detail which console you are required to work on to carry out the steps.
To start, simply click on the named server from the device list (located on the left-hand side of the screen) and click the “Power on” button from the Tools bar. In some cases, the devices may power on automatically.
During the boot-up process, an activity indicator will be displayed in the Name tab.

  • Black—Powered off
  • Orange—Working on your request
  • Green—Ready to access

If the remote console is not displayed automatically in the main window (or pop-up), click the Connect icon located in the Tools bar to start your session.
If the remote console does not appear, please try the following option.

  • Switch between the HTML 5 and Java client versions in the Tools bar.

In the event this does not resolve your connectivity problems, please visit our Help and Support pages for additional resolution options.
sendmail Configuration Step by Step
General Information
We configure the sendmail server for our local LAN in this lab.
The sendmail daemon is configured from a directory of files in /etc/mail and a directory of configuration files in /usr/share/sendmail-cf. There are two basic configuration files.

  • /etc/mail/sendmail.cf The main sendmail configuration file
  • /etc/mail/sendmail.mc A macro that’s easier to edit, which can be used to generate a new sendmail.cf file

The configuration file that the sendmail server program reads is /etc/mail/sendmail.cf. But to change the configuration on the mail server, we modify the /etc/mail/sendmail.mc file using a text editor such as nano or vi. There are two ways to generate the sendmail.cf file: Start or restart the sendmail program or use the m4 command.

For this lab, we are using one Linux server, plabfed01, with IP address 192.168.240.11.

TASK A—Configure sendmail Server
Step 1: Use TigerVNC to log in to the plabfed01 system, open a terminal window, and switch to root (or you can use Putty to log in plabfed01 as root). Make sure the sendmail, mailx, and m4 packages are installed. Type the following commands.
#rpm –qa sendmail *
#rpm –qa mailx
#rpm –qa m4*
If they are installed, the commands’ outputs look like this.

Step 2: If it tells you that the packages are not installed, then you need to install them; otherwise, skip Step 2.
To install sendmail on the Fedora Linux system, type the following.
#yum –y install sendmail
In order to configure sendmail, make sure to install the sendmail -cf package. To install sendmail.cf, type the following.
#yum –y install sendmail -cf
Sometime you may use the m4 macro processor to create a new /etc/mail/sendmail.cf. To install m4, type the following.
#yum –y install m4
To install a text-based utility program for sending and receiving mail, type the following.
#yum –y install mailx
To install all of the above packages, type the following.
#yum –y install sendmail sendmail -cf mailx m4

Step 3: You need to add your domain in /etc/hosts file to have sendmail configured correctly. Use nano or vi to edit the /etc/hosts file; its content should look like this.

Step 4: To make the hostname permanent, modify /etc/sysconfig/network file using nano or vi as editor. The file’s content should look like this.

Step 5: To modify the hostname for the current session using the command hostname, type the following.
#hostname plabfed01.linuxlab.org

Step 6: Use nano or vi to add your domain entry in /etc/mail/local-host-names file, which is a list of hostnames sendmail is to accept as the local host name. Your file should look like this.

Step 7: To allow sendmail to accept network connections from any host, use nano or vi to modify the /etc/mail/sendmail.mc file and add the “dnl #” in front of line number 118. The string “dnl” is used for commenting.

Before:

After:

Note: DNL stands for “delete to new line.”

Step 8: To generate a new sendmail.cf file by using m4, type the following.
#m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

Step 9: Now that we are ready to start sendmail, type the following.
#systemctl start sendmail.service

Step 10: To check sendmail status, type the following.
#systemctl status sendmail.service
An active sendmail status looks like this.
Note: If sendmail fails starting, check for errors using the command journalctl –xn, fix any typos, and restart the service with command #systemctl restart Sendmail.service until sendmail starts successfully. Below is a sample of journalctl –xn command output without any error.

Step 11: To enable the sendmail server at boot time, type the following.
#systemctl enable sendmail.service

TASK B—Validation and Testing
Step 1: Check the sendmail to listen to all interfaces at the host using this command.
#netstat –an | grep :25 | grep tcp
Below is a sample output of the netstat command.

Step 2: Create two test users for testing purposes (that will send and receive mail), use the following commands to add user accounts and to change user’s password. Use the password Password for the testuser accounts. For the next several steps, my examples use user1 and user2 accounts. In the lab, you use testuser1 and testuser2 accounts.
#useradd testuser1
#useradd testuser2
#passwd testuser1
#passwd testuser2
Below are examples; I used user1 and user2 accounts (yours are a little bit different).

Step 3: Log in as the testuser1 and try to send mail using the mail command (tou can switch from root to testuser1).
Here are some examples.
Note:

  • You can switch from root to testuser1 using su—testuser1. To exit from testuser1, type exit to get back to root.
  • When using mailx, to terminate the text message, type . (dot), then hit the Enter key.

Step 4: To see whether the mail was sent correctly, use journalctl –xn to display messages.

Step 5: To check whether mail is delivered to testuser2, log in as the testuser2 and try to read mail using the mail command (again, you can switch from root to testuser2).

For example, see below.
Note:

  • If there is more than one message, type the message number and hit the Enter key to read.
  • To exit mailx, type q, then hit Enter.

TASK C—Lab Report Preparation
Step 1: Be sure you’re in the root account. Clear the screen, type the command #cat /etc/hosts to display its contents, and capture the Linux desktop, then save this image to your Lab Report document in the space allocated for the /etc/hosts file.

Step 2: Be sure you’re in the root account. Clear the screen and type the command #systemctl status sendmail.service to display the sendmail daemon status and capture the Linux desktop, then save this image to your Lab Report document in the space allocated for the #systemctl status sendmail.service command.

Step 3: Be sure you’re in the root account. Clear the screen and use the command #tail -4 /etc/passwd file to display its last four lines and capture the Linux desktop, then save this image to your Lab Report document in the space allocated for the #tail -4 /etc/passwd command.

Step 4: Switch to testuser1. Use the mail command to send the message “Hello!!! My name is ‘your first name’” (include your real first name) to testuser2. Capture the Linux desktop and save this image to your Lab Report document in the space allocated for sending mail to testuser2.

Step 5: Switch to testuser2. Use the mail command to read the message from testuser1. Capture the Linux desktop and save this image to your Lab Report document in the space allocated for read mail from testuser1.
This concludes Lab 3.

WEB 375 WEB375 WEB/375 ENTIRE COURSE HELP – DEVRY UNIVERSITY

  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux

WEB375 Lab 2 Configure a DNS Server in Linux

Lab Scenario
The purpose of this lab is to create a DNS server in Linux. Use the IP addresses that exist when you start Linux.
Virtual Machine Login Information for PLABFED01 and PLABFED02
Username: Student
Password: Password
Username: root
Password: Password

Lab Diagram
During your session, you will have access to the following lab configuration.
WINCONSOLE PLABFED01 PLABFED02
The Linux servers also connect to a private network. The IP address of PLABFED01 is 192.168.240.11 and the IP address of PLABFED01 is 192.168.240.12.

Connecting to Your Lab

In this module you will be working on the following equipment to carry out the steps defined in each exercise.

  • WINCONSOLE (Management Server)
  • PLABFED01 (Linux Server)
  • PLABFED02 (Linux Server)

Each exercise will detail which console you are required to work on to carry out the steps.
To start simply click on the named Server from the device list (located on the left hand side of the screen) and click “Power on” from the Tools bar. In some cases the devices may power on automatically.
During the boot-up process an activity indicator will be displayed in the name tab:

  • Black—Powered off
  • Orange—Working on your request
  • Green—Ready to access

If the remote console is not displayed automatically in the main window (or pop-up), click the Connect icon located in the Tools bar to start your session.
If the remote console does not appear, please try the following option:

  • Switch between the HTML 5 and Java client versions in the Tools bar.

In the event this does not resolve your connectivity problems, please visit our Help and Support pages for additional resolution options.
DNS Configuration Step by Step
General Information
We are going to create a DNS server with the following assumptions:

  • Domain name is linuxlab.org
  • DNS server name is dnsserv
  • IP address of the DNS server is192.168.240.11
  • IP address of the other Linux system on the network is 192.168.240.12

TASK A—Configure DNS server

Step 1: Use TigerVNC to logon to the PLABFED01 system. Open a terminal window, switch to root, and make sure the bind package is installed. Type the following command.
rpm -q bind bind-utils

Step 2: If it tells you that the package is not installed then you need to install it; otherwise skip
To install bind on Fedora Linux system, type the following.
yum –y install bind bind-utils

Step 3: To enable the name server at boot time, type the following.
systemctl enable named.service

  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux

Step 4: Configure the “/etc/named.conf” file. Use a text editor (vi, nano) to edit the /etc/named.conf, comment out two line as shown, then insert the shaded lines below.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// listen-on port 53 { 127.0.0.1; };
// listen-on-v6 port 53 { ::1; };
zone “linuxlab.org” IN {
type master;
file “forward.zone”;
notify no;
};
zone “240.168.192.in-addr.arpa” IN {
type master;
file “reverse.zone”;
notify no;
};
The final /etc/named.conf file should look like below.
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
// listen-on port 53 { 127.0.0.1; };
// listen-on-v6 port 53 { ::1; };
directory “/var/named”;
dump-file “/var/named/data/cache_dump.db”;
statistics-file “/var/named/data/named_stats.txt”;
memstatistics-file “/var/named/data/named_mem_stats.txt”;
allow-query { localhost; };
/*
- If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
- If you are building a RECURSIVE (caching) DNS server, you need to enable recursion.
- If your recursive DNS server has a public IP address, you MUST enable access control to limit queries to your legitimate users. Failing to do so will cause your server to become part of large scale DNS amplification attacks. Implementing BCP38 within your network would greatly reduce such attack surface
*/
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file “/etc/named.iscdlv.key”;
managed-keys-directory “/var/named/dynamic”;
pid-file “/run/named/named.pid”;
session-keyfile “/run/named/session.key”;
};
logging {
channel default_debug {
file “data/named.run”;
severity dynamic;
};
};
zone “.” IN{
type hint;
file “named.ca”;
notify no;
};
zone “linuxlab.org” IN{
type master;
file “forward.zone”;
notify no;
};
zone “240.168.192.in-addr.arpa” IN{
type master;
file “reverse.zone”;
notify no;
};
include “/etc/named.rfc1912.zones”;
include “/etc/named.root.key”;

Step 5: Configure the “/var/named/forward.zone” file. Use a text editor (vi, nano) to create forward.zone file as below, then use the Tab key to insert blank spaces.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
;
;forward.zone
;
;zone file for dnsserv.linuxlab.org
;
$TTL 1H
@ IN SOA dnsserv.linuxlab.org. root.dnsserv.linuxlab.org. (
2002011800 ; Serial
1D ; Refresh 1 day
1H ; Retry 1 hour
1W ; Expire 1 week
2H ) ; Minimum TTL 2 hour
IN NS dnsserv.linuxlab.org.
localhost IN A 127.0.0.1
dnsserv IN A 192.168.240.11
plabfed02 IN A 192.168.240.12

Step 6: Configure the “/var/named/reverse.zone” file. Create reverse.zone file as below.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
;
;reverse.zone
;
;reverse zone file for lookup
;
$TTL 1H
@ IN SOA dnsserv.linuxlab.org. root.dnsserv.linuxlab.org. (
2002011800 ; Serial
1D ; Refresh 1 day
1H ; Retry 1 hour
1W ; Expire 1 week
2H ) ; Minimum TTL 2 hour
IN NS dnsserv.linuxlab.org.
11 IN PTR dnsserv.linuxlab.org.
12 IN PTR plabfed02.linuxlab.org.

Tip
Check the two zone files and make sure that each FQDN, such as dnsserv.linuxlab.org, ends with a period. Missing periods are by far the most common reason that the DNS server does not work.

Step 7: To change the ownership of the zone files, type the following.
chown root.named forward.zone
chown root.named reverse.zone

Step 8: To stop, start up, and check status for the DNS server, type the following.
systemctl stop named.service
systemctl start named.service
systemctl status named.service
• If the nameserver failed to start, view the error messages in the /var/log/messages. Below is an example.
tail /var/log/messages
or
journalctl -xn
• You may have to edit the files /etc/named.conf, /var/named/forward.zone, or /var/named/reverse.zone to correct typos.
• To restart the DNS server, type the following.
Systemctl restart named.service

TASK B—Configure DNS client

You can configure the DNS server and client on the same system. If you want to use the plabfed02 as a DNS client, you need to log in as root and complete the following steps. We are going to configure the DNS client and server on the same system.

Step 1: Configure the “/etc/hosts” file (only keep below three lines).
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost

Step 2: Configure the “/etc/resolv.conf” file (only three lines).
search linuxlab.org
domain linuxlab.org
nameserver 192.168.240.11

Step 3: View the “/etc/nsswitch.conf” file (make sure this line exists).
hosts: files dns

Step 4: View the “/etc/host.conf” file (only two lines), making sure this line exists.
order hosts,bind

TASK C—Testing the DNS Server on a DNS Client

Step 1: Sample a DNS testing with correct results.
Step 2: DNS testing
Follow the below steps closely.

  • Make sure your name server IP address is 192.168.240.11.
  • Restart the named.
  • Check the /etc/resolv.conf; it should contain three lines.

search linuxlab.org
domain linuxlab.org
nameserver 192.168.240.11
Issue the following commands.

  1. host dnsserv
  2. host dnsserv.linuxlab.org
  3. host 192.168.240.11

Step 3: Disable DNS on bootup.
#systemctl disable named.service

TASK D—Lab Report Preparation

Step 1: Use the cat command to display the forward.zone file and capture the Linux desktop, then save this image to your Lab Report document in the space allocated for the forward.zone file.

Step 2: Use the cat command to display the reverse.zone file and capture the Linux desktop, then save this image to your Lab Report document in the space allocated for the reverse.zone file.

Step 3: Clear the screen and issue the following commands, then capture the Linux desktop and save this image to your Lab Report document in the space allocated for host commands.

  • host dnsserv
  • host dnsserv.linuxlab.org
  • host 192.168.240.11

This concludes Lab 2.

WEB 375 WEB375 WEB/375 ENTIRE COURSE HELP – DEVRY UNIVERSITY

  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux

WEB375 Lab 1 Basic Linux and System Admin Commands

Lab Scenario

  • Identify the difference between a casual user and the superuser (or root) by examining the shell prompt.
  • Illustrate the command used to switch from a casual user to the superuser.
  • Illustrate the use of basic Linux shell commands and network management commands.

Virtual Machine Login Information for PLABFED01 and PLABFED02
Username: Student
Password: Password
Username: root
Password: Password

Lab Diagram
During your session, you will have access to the following lab configuration.
WINCONSOLE PLABFED01 PLABFED02
The Linux servers also connect to a private network. The IP address of PLABFED01 is 192.168.240.11 and the IP address of PLABFED01 is 192.168.240.12.

Connecting to Your Lab
In this module, you will be working on the following equipment to carry out the steps defined in each exercise.

  • WINCONSOLE (Management Server)
  • PLABFED01 (Linux Server)
  • PLABFED02 (Linux Server)

Each exercise will detail which console you are required to work on to carry out the steps.
To start, simply click on the named Server from the device list (located on the left-hand side of the screen) and click “Power on” from the Tools bar. In some cases, the devices may power on automatically.
During the boot-up process an activity indicator will be displayed in the Name tab.

  • Black—Powered off
  • Orange—Working on your request
  • Green—Ready to access

If the remote console is not displayed automatically in the main window (or popup) click the Connect icon located in the Tools bar to start your session.
If the remote console does not appear, please try the following option.

  • Switch between the HTML 5 and Java client versions in the Tools bar.

In the event this does not resolve your connectivity problems, please visit our Help and Support pages for additional resolution options.

Lab Tasks
Step 1: Procedures to connect and log in to the Linux Servers.
Action:

  1. Ensure the PLABFED01 and PLAFED02 devices are powered on.
    Orange—working on your request
    Green—ready to access (powered)
  2. Click on WINCONSOLE to select the Windows Server, then click on the Power button to power it on.
  3. You will be logged into the WINCONSOLE and should now see the desktop. Double-click the TigerVNC icon.
    Enter PLABFED01:1 if already not entered in the VNC server text box.
  4. Click Connect, then enter Password in the password text box. Click OK. The Fedora desktop is now displayed.
  5. Click on Activities on the top left of the screen. In the search box, type Terminal. A Terminal icon will appear; click on this.

This will bring up a Terminal screen for you so you can apply the commands in this lab.

  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux

Step 2: Review Basic Linux Commands
Action:

  1. Go to the home directory.
    Enter the following command.
    cd ~
  2. Display a working directory.
    Enter the following command.
    pwd
  3. Display a listing of the current directory including hidden files.
    Enter the following command.
    ls –a
  4. Display a long listing of the ⁄etc directory.
    Enter the following command.
    ls -l ⁄etc
  5. Create mydir directory and verify it.
    Enter the following commands.
    mkdir mydir
    ls
  6. Copy mydir to mydir2 directory and verify it.
    Enter the following commands.
    cp –r mydir mydir2
    ls
  7. Go to mydir directory and verify it.
    Enter the following commands.
    cd mydir
    pwd
  8. Go up one level and verify it.
    Enter the following commands.
    cd ..
    pwd
    ls –a
  9. Delete mydir directory and verify it.
    Enter the following commands.
    rmdir mydir
    ls
  10. Copy the file passwd from /etc to the current directory and verify it.
    Enter the following commands.
    cp /etc/passwd myfile
    ls
  11. Copy file myfile to myfile2 and verify it.
    Enter the following commands.
    cp myfile myfile2
    ls
  12. Delete myfile2 and verify it.
    Enter the following commands.
    rm myfile2
    ls
  13. View the content of myfile using the cat command.
    Enter the following command.
    cat myfile
  14. View the content of myfile using the more command.
    Enter the following command.
    more myfile
    Note: hit “enter” key to advance one line
    hit “space bar” key to go to next page
    hit “b” key to go backward one page
    hit “f” key to go forward one page
    hit “q” key to exit
  15. Redirect the content of myfile to myfile3 and verify it.
    Enter the following command.
    cat myfile > myfile3
    ls
    cat myfile3
  16. View a list of users logged in the system.
    Enter the following command.
    who
  17. View this month’s calendar.
    Enter the following command.
    cal
  18. Create a file containing this month’s calendar and verify it.
    Enter the following commands.
    cal > thismonth
    ls
  19. View the network interface parameters.
    Enter the following command.
    ifconfig
  20. Check connectivity to PLABFED02.
    Enter the following command.
    ping –c 3 192.168.240.12
  21. Clear the screen.
    Enter the following command.
    clear

Step 3: Become the superuser (root)
Using the switch user command, switch from casual user mode to the superuser mode. Remember to use the dash (-) option after keying in the su command and before hitting the Enter key. The root password is Password.

Action:

  1. Switch user to root and verify it.
    Enter the following commands.
    su –
    whoami
  2. Exit root login.
    Enter the following commands.
    exit
    whoami
  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux

Note: When you log in as regular user, the prompt is $.
When you log in as root, the prompt is #.

Step 4: Use the nano Command Line Editor to Create and Modify Files
Action:

  1. Navigate to your home directory.
    Enter the following command.
    cd ~
    pwd
  2. Use nano to create a file.
    Enter the following command.
    nano myfile1
    You are now in Editor Mode for the file myfile1.
  3. Add content to the file.
    At this point, you can type in some text. Type in your full name, any address, and any phone number number on different lines.
  4. Control the keys for nano.
    Note the control menu at the bottom of the nano text editor. The (^) symbol refers to the Ctrl key, so ^X (Exit) refers to simultaneously pressing the Ctrl and X keys. Other common control keys are ^K and ^U for cut and paste operations and ^R for opening a new file. ^W is a control key for finding text in a file.
    If you are using nano as your text editor and Internet Explorer or Chrome as your browser, you cannot use Ctrl + O to save your file. This hotkey is used by IE and Chrome to open files. You will have to exit and save as follows: press Ctrl + X (Exit) and at the prompt (Save Modified Buffer), press Y, then Enter. This will save the file and exit the text editor. Mozilla Firefox does not have this issue with Ctrl + O.
  5. Save your modifications and exit.
    Press Ctrl + O and press Enter to save your myfile1 file.
    Press Ctrl + X to exit the nano command-line text editor.
  6. Check the content of your file.
    Enter the following command.
    cat myfile1

You now can see your contents of the myfile1 file.
Capture the Skillsoft desktop in the text box provided in your Lab Report
document.

Step 5: Make sure you have the answers for the following questions before typing them then take a screenshot showing all commands and paste in your Lab Report document.

  1. Clear the screen
  2. Type the command whoami
  3. Create a new directory named lab1
  4. Change directories into lab1
  5. List all files, even hidden files (directory should be blank)
  6. Create a new file that contains the calendar for this month
  7. List all files again, even hidden files (there should be just one file)
  8. Display the entire contents of that new file
  9. Delete the file and verify
  10. Display today’s date

Capture the Skillsoft desktop in the text box provided in your Lab Report
document.
This concludes your lab.

  • WEB375 Lab 1 Basic Linux and System Admin Commands,
  • WEB375 Lab 2 Configure a DNS Server in Linux,
  • WEB375 Lab 3 Configure a Sendmail Server in Linux,
  • WEB375 Lab 4 Configure a vsftp Server in Linux,
  • WEB375 Lab 5 Configure HTTP Server in Linux,
  • WEB375 Lab 6 Configure a MySQL Server in Linux,
  • WEB375 Lab 7 Configure iptables in Linux