★ Pass on Your First TRY ★ 100% Money Back Guarantee ★ Realistic Practice Exam Questions

Free Instant Download NEW RH302 Exam Dumps (PDF & VCE):
Available on: https://www.certleader.com/RH302-dumps.html


Q101. CORRECT TEXT

You have a ftp server having IP address 192.168.0.254. Using iptables, allow the ftp connection only from the internal network where internal network is 192.168.0.0/24.

Answer and Explanation:

1. iptables -t filter -A INPUT -s ! 192.168.0.0/24 -p tcp -d 192.168.0.254 --dport 20 -j DROP

2. iptables -t filter -A INPUT -s ! 192.168.0.0/24 -p tcp -d 192.168.0.254 --dport 21 -j DROP

iptables is the build-in firewall tools, used to filter the packets and for nat. By identifying Source Address, Destination Address, type of protocol, source and destination port we can filter the packets.

-sà Source Address

-dà Destination Address

-p à Layer 3 Protocol

-dàDestination Address

--sportà Source Prot

--dportàDestination Port

-ià Incoming Interface

-oà Outgoing Interface

-t à Table either filter or nat or mangle

-Aà Chain can be either INPUT, OUTPUT, FORWARD, PREROUTING, POSTROUTING.


Q102. CORRECT TEXT

Any mail coming for accountmanager should get by jeff user.

Answer and Explanation:

1. vi /etc/mail/virtusertable

accountmanager@ jeff

2. service sendmail restart


Q103. CORRECT TEXT

You are giving the debug RHCT exam. The examiner told you that the password of root is redhat.

When you tried to login displays the error message and redisplayed the login screen. You changed the root password, again unable to login as a root. How will you make Successfully Login as a root.

Answer and Explanation:

When root unable to login into the system think:

1. Is password correct?

2. Is account expired?

3. Is terminal Blocked?

Do these Steps:Boot the System on Single user mode.Change the passwordCheck the account expire date by using chage -l root command.

If account is expired, set net expire date: chage -E "NEVER" root

1. Check the file /etc/securetty à Which file blocked to root login from certain terminal.

2. If terminal is deleted or commented write new or uncomment.

3. Reboot the system and login as a root.


Q104. CORRECT TEXT

Configure the web server for www.abc.com associated IP address is 192.100.0.1 by allowing access within your example.com domain.

Answer and Explanation:

1. vi /etc/httpd/conf/httpd.conf

<VirtualHost 192.100.0.1>

ServerName www.abc.com

DocumentRoot /var/www/abc/

<Directory /var/www/abc>

Order Allow, Deny

Allow from .example.com

</Directory>

DirectoryIndex index.html

ServerAdmin webmaster@abc.com

ErrorLog logs/error_abc.logs

CustomLog logs/custom_abc.logs common

</VirtualHost>

2. Create the directory and index page on specified path. (Index page can download from

ftp://server1.example.com at exam time)

Check the SELinux context of index page , should like this:

-rw-r--r-- root root system_u:object_r:httpd_sys_content_t /var/www/html/index.html

If SELinux Context is mismatched, use the restorecon -R /var command

3. service httpd start|restart

4. chkconfig httpd on

Order allow, deny à Allows explicitly allowed clients, denies everyone else; clients matched by both allow and deny are denied.

Order deny, allow à denies explicitly denied clients, allows everyone else, clients matched by both allow and deny are allowed.


Q105. CORRECT TEXT

Your System is configured in 192.168.0.0/24 Network and your nameserver is 192.168.0.254.

Make successfully resolve to server1.example.com.

Answer and Explanation:

Very Easy question, nameserver is specified in question,

1. vi /etc/resolv.conf

nameserver 192.168.0.254

2. host server1.example.com


Q106. CORRECT TEXT

There is a NFS server 192.168.0.254 and all required packages are dumped in /var/ftp/pub of that server and the /var/ftp/pub directory is shared. Install the Redhat Enterprise Linux 5 by creating following partitions:

/ 1000

/boot 200

/home 1000

/var 1000

/usr 4000

swap 2X256 (RAM SIZE)

Answer and Explanation:

Note: Examiner will provide you the Installation startup CD. And size may vary see on the exam paper.

1. Insert the CD on CD-ROM and start the system.

2. In Boot: Prompt type linux askmethod

3. It will display the language, keyboard selection.

4. It will ask you for the installation method.

5. Select the NFS Image from the list

6. It will ask the IP Address, Net mask, Gateway and Name Server. Select Use

Dynamic IP Configuration: because DHCP Server will be configured in your exam lab.

7. It will ask for the NFS Server Name and Redhat Enterprise Linux Directory.

Specify the NFS Server: 192.168.0.254

Directory: /var/ftp/pub

8. After Connecting to the NFS Server Installation start in GUI. Go up to the partition screen by selecting the different Options.

9. Create the partition According to the Question because Size and what-what partition should you create at installation time is specified in your question

10. Then select the MBR Options, time zone and go upto package selections.

It is another Most Important Time of installation. Due to the time limit, you should care about the installation packages. At Exam time you these packages are enough.

X-Window System

GNOME Desktop

(these two packages are generally not required)

Administration Tools.

System Tools

Windows File Server

FTP Servers

Mail Servers

Web Servers

Network Servers

Editors

Text Based Internet

Server Configuration Tools

Printing Supports

When installation will complete, your system will reboot. Jump for another Question.


Q107. CORRECT TEXT

Add a job on Cron schedule to display Hello World on every two Seconds in terminal 8.

Answer and Explanation:

1. cat >schedule

*/2 * * * * /bin/echo "Hello World" >/dev/tty8

3. crontab schedule

4. Verify using: crontab -l

5. service crond restart

Cron helps to schedule on recurring events. Pattern of Cron is:

Minute Hour Day of Month Month Day of Week Commands

0-59 0-23 1-31 1-12 0-7 where 0 and 7 means Sunday.

Note * means every. To execute the command on every two minutes */2.

To add the scheduled file on cron job: crontab filename

To List the Cron Shedule: crontab -l

To Edit the Schedule: crontab -e

To Remove the Schedule: crontab -r


Q108. CORRECT TEXT

Eric user should able to write on Document root directory.

Answer and Explanation:

Document directive is used in apache configuration file to specify the directory where all web site related documents are. According to question eric user should able to write into the Document root directory.

Better set the permission using ACL (Access Control List), to apply the permission using acl needs to mount the filesystem with acl options. Example in above answer documentroot is in /var and /var is mounting separate file system so needs to mount the /var file system with acl option.

1. vi /etc/fstab

LABEL=/var /var ext3 defaults 1 1

2. mount -o remount /var

3. setfacl -m u:eric:rwx /var/www/example

4. getfacl /var/www/example

getfacl and setfacl two commands used to maintain the permission through acl. setfacl is used to set the permission on file/directory, getfacl is used to display the permission of file/directory.


Q109. CORRECT TEXT

You have a domain in your LAN named example.com and my133t.org. Allow the

- Allow the FTP connection only from local domain.

- Deny the FTP connection from my133t.org

Answer and Explanation:

1. vi /etc/hosts.deny

vsftpd:ALL EXCEPT .example.com

or

1. vi /etc/hosts.deny

vsftpd:ALL

2. vi /etc/hosts.allow

vsftpd:.example.com

We can secure the services using tcp_wrappers. There are main two files, /etc/hosts.allow and /etc/hosts.deny.

There will be three stage access checking

- Is access explicitly permitted? Means permitted from /etc/hosts.allow?

- Otherwise, Is access explicitly denied? Means denied from /etc/hosts.deny?

- Otherwise, by default permit access if neither condition matched.

To deny the services we can configure /etc/hosts.deny file using ALL and EXCEPT operation.

Pattern of /etc/hosts.allow and /etc/hosts.deny file is:

Demon_list:client_list:options

In Client list can be either domain name or IP address.


Q110. CORRECT TEXT

You have ftp site named ftp.example.com. You want to allow anonymous users to upload files on you ftp site. Configure to allow anonymous to upload the files.

Answer and Explanation:

1. vi /etc/vsftpd/vsftpd.conf

anon_upload_enable=yes

chown_uploads=yes

chown_username=username

2. service vsftpd start| restart

3. directory owner should be ftp user: chown ftp directory path allowed to upload files.

4. Write permission should be set to owner user.

By default anonymous user can only download files from the ftp. Should write

anon_upload_enable=yes to enable anonymous upload files. Default Directory for anonymous is /var/ftp.