{"product_id":"full-course-guide-web375-lab-web-architecture-lab-60439-devry-university_id-zfmkfaxty53","title":"(New Full Course Guide) WEB375 Lab Web Architecture with Lab - 60439  Devry University","description":"\u003ch1\u003e\u003cb\u003e\u003cspan\u003eWEB375 Lab Web Architecture with Lab - 60439  Devry University Solution Download\u003c\/span\u003e\u003c\/b\u003e\u003c\/h1\u003e\n\u003cp\u003eWEB375 Lab 1 Basic Linux and System Admin Commands\u003c\/p\u003e\n\u003cp\u003eWEB375 Lab 2 Configure a DNS Server in Linux\u003c\/p\u003e\n\u003cp\u003eWEB375 Lab 3 Configure a Sendmail Server in Linux\u003c\/p\u003e\n\u003cp\u003eWEB375 Lab 4 Configure a vsftp Server in Linux\u003c\/p\u003e\n\u003cp\u003eWEB375 Lab 5 Configure HTTP Server in Linux\u003c\/p\u003e\n\u003cp\u003eWEB375 Lab 6 Configure a MySQL Server in Linux\u003c\/p\u003e\n\u003cp\u003eWEB375 Lab 7 Configure iptables in Linux\u003c\/p\u003e\n\u003ch2\u003e\n\u003cb\u003e\u003cspan\u003eWEB375 Lab 7 Configure iptables in Linux\u003c\/span\u003e\u003c\/b\u003e\u003cb\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/b\u003e\n\u003c\/h2\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eThe 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eLab 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eConnecting to your iLab In this module, you will be working on the following equipment to carry out the steps defined in each exercise.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eWINCONSOLE (Management Server) PLABFED01 (Linux Server) PLABFED02 (Linux Server)\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eEach 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eBlack—Powered off Orange—Working on your request Green—Ready to access\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eIf 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eSwitch between the HTML 5 and Java client versions in the Tools bar.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eIn 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eiptables handles filtering for IPv4 ip6tables handles filtering for IPv6\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eIPTables main files are as follows.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e\/etc\/sysconfig\/iptables—where rule sets are saved \/sbin\/iptables—binary\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eAt present, there are four total chains.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eINPUT: 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003ePacket-Matching Rules\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eEach 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).\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTarget Meanings\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eThe 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 1: To use the iptables service, disable firewalld by typing the following commands. #systemctl disable firewalld #systemctl stop firewalld\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 2: Make sure to install iptables by typing the following commands. #yum -y install iptables-services #rpm –q iptables\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 3: To install the system-config-firewall tool, type the following commands. #yum -y install system-config-firewall\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 4: To execute the system-config-firewall tool, type the following command. #system-config-firewall A Firewall Configuration window will pop up.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eClick the Wizard button on the top left corner. Leave the “Information” page and click on Forward. For Firewall Setting, keep the default “system with network access” and click on Forward. For user skill level, keep the default “Beginner” and click on Forward. For Configuration, select Load “Server” configuration and click on OK, then click the Apply button on the top left corner and click on YES. Click on X to close the firewall configuration.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTo 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 5: To turn on the firewall, type the following commands. #systemctl start iptables #systemctl enable iptables\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 6: To check the status of the firewall, type the following command. #systemctl status iptables Note:The below commands are for reference.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTo 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 2: To display the status of the firewall, type the following command. #iptables -L -n -v Where -L: List rules\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e-v: Display detailed information\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e-n: Display IP address and port in numeric format\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 3: To display INPUT or OUTPUT chain rules, type the following commands. #iptables -L INPUT -n -v #iptables -L OUTPUT -n -v –line-numbers\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e-X: Delete chain\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 9: To stop the firewall, type the following command. #systemctl stop iptables\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 10: To restore firewall rules from the file \/etc\/sysconfig\/iptables, type: #systemctl restart iptables\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.”\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 2: On PLABFED01: Look at the INPUT chain; the rule on line 4 accepts the telnet connections.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eYour 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 3: On PLABFED02: Check whether telnet connections to PLABFED01 are possible.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eFrom 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 4: On PLABFED01: We want to set up the iptables to reject telnet connections.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eYour 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 5: On PLABFED02: Check whether telnet connections to PLABFED01 are still possible.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eFrom 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eThis concludes iLab 7.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eYou May Also Like: 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e \u003c\/span\u003e\u003c\/p\u003e\n\u003ch2\u003e\n\u003cb\u003e\u003cspan\u003eWEB375 Lab 6 Configure a MySQL Server in Linux\u003c\/span\u003e\u003c\/b\u003e\u003cb\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/b\u003e\n\u003c\/h2\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eThe 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eLab 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eConnecting to Your Lab In this module, you will be working on the following equipment to carry out the steps defined in each exercise.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eWINCONSOLE (Management Server) PLABFED01 (Linux Server) PLABFED02 (Linux Server)\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eEach 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eBlack – Powered Off Orange – Working on your request Green – Ready to access\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eIf 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eSwitch between the HTML 5 and Java client versions in the Tools bar.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eIn the event this does not resolve your connectivity problems, please visit our Help \/ Support pages for additional resolution options.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eInstall 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 1: To stop all firewalls or security features, type the following commands: #systemctl stop firewalld #systemctl stop iptables\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 2: To start the mysqld service, type: #systemctl start mysqld\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 4: MySQL Secure Installation performs the following:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eSet (change) root password Remove anonymous users Disallow root login remotely Remove test database and access to it Reload privilege tables\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTo 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 6: To exit MySQL database, type:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK C – Create Your First SQL Server Database in Three Quick Steps Connect to MySQL database (localhost) with password using command mysql -u root -p\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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)\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 2: To use the new database, type the following command and press Enter:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 3: Create new table To create an Employees table to hold data, type the following command and press Enter:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 4: Enter data To enter data into the Employees table, type the following statements:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 5: View data and exit MySQL Execute the following statements:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eYou May Also Like: 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 7 Configure iptables in Linux\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e \u003c\/span\u003e\u003c\/p\u003e\n\u003ch2\u003e\n\u003cb\u003e\u003cspan\u003eWEB375 Lab 5 Configure HTTP Server in Linux\u003c\/span\u003e\u003c\/b\u003e\u003cb\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/b\u003e\n\u003c\/h2\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eThe 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eLab 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eWINCONSOLE (Management Server) PLABFED01 (Linux Server) PLABFED02 (Linux Server)\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eEach 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eBlack – Powered Off Orange – Working on your request Green – Ready to access\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eIf 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eSwitch between the HTML 5 and Java client versions in the tools bar.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eIn the event this does not resolve your connectivity problems, please visit our Help \/ Support pages for additional resolution options.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003esend 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eWhat 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e\/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)\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eThe 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eDirectives that control the operation of the Apache server process as a whole (the ‘global environment’). 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. 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eThe 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 1: To stop all firewalls or security features, type the following commands: #systemctl stop firewalld #systemctl stop iptables\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTo 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).\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 7: To enable the vsftp server during boot, type the following command: #systemctl enable httpd\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK C –Validate and Test Web Server Now we need to have two TigerVNC sessions, one logon on plabfed01 and the other on plabfed02\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eUse TigerVNC to logon plabfed01 as root. Use TigerVNC to logon plabfed02 as root.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eNote: 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 2: On the web server (plabfed01), create a simple web page and save it as index.html in your DocumentRoot directory:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003ecd \/var\/www\/html vi index.html\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eEnter the following text:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eApache is cool!!! This message is from your_name_here. Your index.html file’s contents look like this:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 2: Update the \/etc\/hosts file with the content below:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 4: To check the syntax of the file, and before restarting the web server, type:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 5: To restart the HTTPD web server type:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK E –Test Virtual Hosting Now we use Putty to logon plabfed01 as root to perform the testing.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eYou May Also Like: 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 6 Configure a MySQL Server in Linux WEB375 Lab 7 Configure iptables in Linux\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e \u003c\/span\u003e\u003c\/p\u003e\n\u003ch2\u003e\n\u003cb\u003e\u003cspan\u003eWEB375 Lab 4 Configure a vsftp Server in Linux\u003c\/span\u003e\u003c\/b\u003e\u003cb\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/b\u003e\n\u003c\/h2\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eThe 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eLab 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eConnecting to Your Lab In this module you will be working on the following equipment to carry out the steps defined in each exercise.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eWINCONSOLE (Management Server) PLABFED01 (Linux Server) PLABFED02 (Linux Server)\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eEach 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eBlack – Powered Off Orange – Working on your request Green – Ready to access\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eIf 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eSwitch between the HTML 5 and Java client versions in the Tools bar.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eIn the event this does not resolve your connectivity problems, please visit our Help \/ Support pages for additional resolution options.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eFile 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e\u003cspan style=\"font-family: Calibri;\"\u003e– anonymous FTP – login with the username ‘anonymous’\u003c\/span\u003e\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e\u003cspan style=\"font-family: Calibri;\"\u003e– real FTP – login with a real username and password.\u003c\/span\u003e\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eBecome 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eSetting Up the Configuration Files There are three main configuration files you will need to edit to set up a vsftpd server:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e\/etc\/vsftpd\/vsftpd.conf \/etc\/hosts.allow \/etc\/hosts.deny \/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 \/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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003ehosts.allow. \/etc\/hosts.deny\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTo denying everybody: vsftpd:ALL\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e\/etc\/hosts.allow\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTo 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStarting 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 1: To stop all firewalls or security features, type the following commands: #systemctl stop firewalld #systemctl stop iptables #setsebool -P ftp_home_dir=1\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTo 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eCheck 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 6: To enable the vsftp server during boot, type the following command: #systemctl enable vsftpd.service\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK C –Validation and Testing Now we need to have two Putty sessions, one logon plabfed01 and the other on plabfed02\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eUse Putty to logon plabfed01 as root. Use Putty to logon plabfed02 as root.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eArrange the terminal so we can switch back and forth easily. See the screenshot below:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 1: Create a user account on plabfed01 (vsftp server) using these commands with the password Password: #useradd usera #passwd usera\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 2: Create a user account on plabfed02 (ftp client) using these commands with the password Password: #useradd userb #passwd userb\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 6: Configure vsftp allowing anonymous login and test it.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eBe 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 7: Configure vsftp to only disallow usera login and test it.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eBe 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eThis concludes Lab 4.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eYou May Also Like: 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 5 Configure HTTP Server in Linux WEB375 Lab 6 Configure a MySQL Server in Linux WEB375 Lab 7 Configure iptables in Linux\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e \u003c\/span\u003e\u003c\/p\u003e\n\u003ch2\u003e\n\u003cb\u003e\u003cspan\u003eWEB375 Lab 3 Configure a Sendmail Server in Linux\u003c\/span\u003e\u003c\/b\u003e\u003cb\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/b\u003e\n\u003c\/h2\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eThe 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eLab 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eConnecting to Your Lab In this module, you will be working on the following equipment to carry out the steps defined in each exercise.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eWINCONSOLE (Management Server) PLABFED01 (Linux Server) PLABFED02 (Linux Server)\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eEach 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eBlack—Powered off Orange—Working on your request Green—Ready to access\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eIf 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eSwitch between the HTML 5 and Java client versions in the Tools bar.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eIn 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e\/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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eThe 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eFor this lab, we are using one Linux server, plabfed01, with IP address 192.168.240.11.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 5: To modify the hostname for the current session using the command hostname, type the following. #hostname plabfed01.linuxlab.org\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eBefore:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eAfter:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eNote: DNL stands for “delete to new line.”\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 8: To generate a new sendmail.cf file by using m4, type the following. #m4 \/etc\/mail\/sendmail.mc \u0026gt; \/etc\/mail\/sendmail.cf\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 9: Now that we are ready to start sendmail, type the following. #systemctl start sendmail.service\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 11: To enable the sendmail server at boot time, type the following. #systemctl enable sendmail.service\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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).\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eYou 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 4: To see whether the mail was sent correctly, use journalctl –xn to display messages.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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).\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eFor example, see below. Note:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eIf 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eYou May Also Like: WEB375 Lab 1 Basic Linux and System Admin Commands WEB375 Lab 2 Configure a DNS 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e \u003c\/span\u003e\u003c\/p\u003e\n\u003ch2\u003e\n\u003cb\u003e\u003cspan\u003eWEB375 Lab 2 Configure a DNS Server in Linux\u003c\/span\u003e\u003c\/b\u003e\u003cb\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/b\u003e\n\u003c\/h2\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eLab 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eLab 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eConnecting to Your Lab\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eIn this module you will be working on the following equipment to carry out the steps defined in each exercise.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eWINCONSOLE (Management Server) PLABFED01 (Linux Server) PLABFED02 (Linux Server)\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eEach 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eBlack—Powered off Orange—Working on your request Green—Ready to access\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eIf 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eSwitch between the HTML 5 and Java client versions in the Tools bar.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eIn 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:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eDomain 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK A—Configure DNS server\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 3: To enable the name server at boot time, type the following. systemctl enable named.service\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e1 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e\/\/ 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; }; \/*\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e- If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e- If you are building a RECURSIVE (caching) DNS server, you need to enable recursion.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e- 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e*\/\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003erecursion 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”;\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e; ;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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 6: Configure the “\/var\/named\/reverse.zone” file. Create reverse.zone file as below.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e1 2 3 4 5 6 7 8 9 10 11 12 13 14 15\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e; ;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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTip 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 7: To change the ownership of the zone files, type the following. chown root.named forward.zone chown root.named reverse.zone\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e\u003cspan style=\"font-family: Calibri;\"\u003e• If the nameserver failed to start, view the error messages in the \/var\/log\/messages. Below is an example.\u003c\/span\u003e\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003etail \/var\/log\/messages or journalctl -xn\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e\u003cspan style=\"font-family: Calibri;\"\u003e• You may have to edit the files \/etc\/named.conf, \/var\/named\/forward.zone, or \/var\/named\/reverse.zone to correct typos.\u003c\/span\u003e\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e\u003cspan style=\"font-family: Calibri;\"\u003e• To restart the DNS server, type the following.\u003c\/span\u003e\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eSystemctl restart named.service\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK B—Configure DNS client\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eYou 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 2: Configure the “\/etc\/resolv.conf” file (only three lines). search linuxlab.org domain linuxlab.org nameserver 192.168.240.11\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 3: View the “\/etc\/nsswitch.conf” file (make sure this line exists). hosts: files dns\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 4: View the “\/etc\/host.conf” file (only two lines), making sure this line exists. order hosts,bind\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK C—Testing the DNS Server on a DNS Client\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 1: Sample a DNS testing with correct results. Step 2: DNS testing Follow the below steps closely.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eMake sure your name server IP address is 192.168.240.11. Restart the named. Check the \/etc\/resolv.conf; it should contain three lines.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003esearch linuxlab.org domain linuxlab.org nameserver 192.168.240.11 Issue the following commands.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003ehost dnsserv host dnsserv.linuxlab.org host 192.168.240.11\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 3: Disable DNS on bootup. #systemctl disable named.service\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eTASK D—Lab Report Preparation\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003ehost dnsserv host dnsserv.linuxlab.org host 192.168.240.11\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eThis concludes Lab 2.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eYou May Also Like: WEB375 Lab 1 Basic Linux and System Admin Commands 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e \u003c\/span\u003e\u003c\/p\u003e\n\u003ch2\u003e\n\u003cb\u003e\u003cspan\u003eWEB375 Lab 1 Basic Linux and System Admin Commands\u003c\/span\u003e\u003c\/b\u003e\u003cb\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/b\u003e\n\u003c\/h2\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eLab Scenario\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eIdentify 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eVirtual Machine Login Information for PLABFED01 and PLABFED02 Username: Student Password: Password Username: root Password: Password\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eLab 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eConnecting to Your Lab In this module, you will be working on the following equipment to carry out the steps defined in each exercise.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eWINCONSOLE (Management Server) PLABFED01 (Linux Server) PLABFED02 (Linux Server)\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eEach 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eBlack—Powered off Orange—Working on your request Green—Ready to access\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eIf 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eSwitch between the HTML 5 and Java client versions in the Tools bar.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eIn the event this does not resolve your connectivity problems, please visit our Help and Support pages for additional resolution options.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eLab Tasks Step 1: Procedures to connect and log in to the Linux Servers. Action:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eEnsure the PLABFED01 and PLAFED02 devices are powered on. Orange—working on your request Green—ready to access (powered) Click on WINCONSOLE to select the Windows Server, then click on the Power button to power it on. 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. Click Connect, then enter Password in the password text box. Click OK. The Fedora desktop is now displayed. Click on Activities on the top left of the screen. In the search box, type Terminal. A Terminal icon will appear; click on this.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eThis will bring up a Terminal screen for you so you can apply the commands in this lab.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 2: Review Basic Linux Commands Action:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eGo to the home directory. Enter the following command. cd ~ Display a working directory. Enter the following command. pwd Display a listing of the current directory including hidden files. Enter the following command. ls –a Display a long listing of the ?etc directory. Enter the following command. ls -l ?etc Create mydir directory and verify it. Enter the following commands. mkdir mydir ls Copy mydir to mydir2 directory and verify it. Enter the following commands. cp –r mydir mydir2 ls Go to mydir directory and verify it. Enter the following commands. cd mydir pwd Go up one level and verify it. Enter the following commands. cd .. pwd ls –a Delete mydir directory and verify it. Enter the following commands. rmdir mydir ls Copy the file passwd from \/etc to the current directory and verify it. Enter the following commands. cp \/etc\/passwd myfile ls Copy file myfile to myfile2 and verify it. Enter the following commands. cp myfile myfile2 ls Delete myfile2 and verify it. Enter the following commands. rm myfile2 ls View the content of myfile using the cat command. Enter the following command. cat myfile View the content of myfile using the more command. Enter the following\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003ecommand. 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 Redirect the content of myfile to myfile3 and verify it. Enter the following command. cat myfile \u0026gt; myfile3 ls cat myfile3 View a list of users logged in the system. Enter the following command. who View this month’s calendar. Enter the following command. cal Create a file containing this month’s calendar and verify it. Enter the following commands. cal \u0026gt; thismonth ls View the network interface parameters. Enter the following command. ifconfig Check connectivity to PLABFED02. Enter the following command. ping –c 3 192.168.240.12 Clear the screen. Enter the following command. clear\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eAction:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eSwitch user to root and verify it. Enter the following commands. su – whoami Exit root login. Enter the following commands. exit whoami\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eNote: When you log in as regular user, the prompt is $. When you log in as root, the prompt is #.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 4: Use the nano Command Line Editor to Create and Modify Files Action:\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eNavigate to your home directory. Enter the following command. cd ~ pwd Use nano to create a file. Enter the following command. nano myfile1 You are now in Editor Mode for the file myfile1. 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. 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eexit the text editor. Mozilla Firefox does not have this issue with Ctrl + O. 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. Check the content of your file. Enter the following command. cat myfile1\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eYou now can see your contents of the myfile1 file. Capture the Skillsoft desktop in the text box provided in your Lab Report document.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eStep 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.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eClear the screen Type the command whoami Create a new directory named lab1 Change directories into lab1 List all files, even hidden files (directory should be blank) Create a new file that contains the calendar for this month List all files again, even hidden files (there should be just one file) Display the entire contents of that new file Delete the file and verify Display today’s date\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eCapture the Skillsoft desktop in the text box provided in your Lab Report document. This concludes your lab.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003eYou May Also Like: 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\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cspan\u003e \u003c\/span\u003e\u003c\/p\u003e","brand":"Take My Online Class","offers":[{"title":"Default Title","offer_id":53405437690131,"sku":null,"price":79.99,"currency_code":"USD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0966\/3794\/4083\/files\/WEB375Capture2.png?v=1770053093","url":"https:\/\/takemyonlineclass.store\/products\/full-course-guide-web375-lab-web-architecture-lab-60439-devry-university_id-zfmkfaxty53","provider":"Take My Online Class","version":"1.0","type":"link"}