Our pass rate is high to 98.9% and the similarity percentage between our RH302 study guide and real exam is 90% based on our seven-year educating experience. Do you want achievements in the Red Hat RH302 exam in just one try? I am currently studying for the Red Hat RH302 exam. Latest Red Hat RH302 Test exam practice questions and answers, Try Red Hat RH302 Brain Dumps First.


♥♥ 2021 NEW RECOMMEND ♥♥

Free VCE & PDF File for Red Hat RH302 Real Exam (Full Version!)

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

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

Q131. CORRECT TEXT

Make on /data that only the user owner and group owner member can fully access.

Answer and Explanation:

1. chmod 770 /data

2. Verify using : ls -ld /data

Preview should be like:

drwxrwx--- 2 root sysadmin 4096 Mar 16 18:08 /data

To change the permission on directory we use the chmod command. According to the question that only the owner user (root) and group member (sysadmin) can fully access the directory so:

chmod 770 /data


Q132. CORRECT TEXT

Your LAN is connected to WAN also. You want to deny the ssh coming from WAN. Configure using iptables to allow ssh connection only from the Local LAN where you LAN IP address is 192.168.0.0/24.

Answer and Explanation:

1. iptables -t filter -A INPUT -s ! 192.168.0.0/24 -p tcp --dport 22 -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.

ssh service use the 22 port so we can block connection from outside the LAN.


Q133. CORRECT TEXT

Configure the DNS server by allowing query only from the 192.168.0.0/24 Local Network.

Answer and Explanation:

1. vi /var/named/chroot/etc/named.conf

acl localnet { 192.168.0.0/24; };

options {

allow-query { localnet; };

};

2. service named restart | start

allow-query is a global option on /var/named/chroot/etc/named.conf, specifies an address match list of hosts allowed to query this server. If this option is not set, any host can query the server.


Q134. CORRECT TEXT

Your System is going to use as a Router for two networks. One Network is 192.168.0.0/24 and Another Network is 192.168.1.0/24. Both network's IP address has assigned. How will you forward the packets from one network to another network?

Answer and Explanation:

1. echo "1" >/proc/sys/net/ipv4/ip_forward

2. vi /etc/sysctl.conf

net.ipv4.ip_forward = 1

If you want to use the Linux System as a Router to make communication between different networks, you need enable the IP forwarding. To enable on running session just set value 1 to /proc/sys/net/ipv4/ip_forward. As well as automatically turn on the IP forwarding features on next boot set on /etc/sysctl.conf file.


Q135. CORRECT TEXT

Add a cron schedule to take full backup of /home on every day at 5:30 pm to /dev/st0 device.

Answer and Explanation:

1. vi /var/schedule

30 17 * * * /sbin/dump -0u /dev/st0 /dev/hda7

2. crontab /var/schedule

3. service crond restart

We can add the cron schedule either by specifying the scripts path on /etc/crontab file or by creating on text file on crontab pattern.

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.


Q136. CORRECT TEXT

ssh service is enabled in your Server. Your LAN is connected to WAN also. Configure to match following conditions.

i. Deny the ssh from outside the example.com domain members.

ii. If any denied hosts tried for ssh then send the information through mail with client;s information.

Answer and Explanation:

1. vi /etc/hosts.deny

sshd:ALL EXCEPT .example.com: spawn echo "Loging attempt from %c to %s" | mail -s "Login from denied hosts" root

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.


Q137. CORRECT TEXT

There are mixed lots of System running on Linux and Windows OS. Some users are working on Windows Operating System. There is a /data directory on linux server should make available on windows to user1 and user2 users on read and write mode and read only to other samba users.

Answer and Explanation:

1. vi /etc/samba/smb.conf

[global]

netbios name=station?

workgroup = mygroup

server string=Share from Linux Server

security=user

smb passwd file=/etc/samba/smbpasswd

encrypt passwords=yes

[data]

path=/data

writable=no

public=no

browsable=yes

write list= user1 user2

2. smbpasswd -a user1

3. smbpasswd -a user2

........

4. service smb start | restart

5. chkconfig smb on

Samba servers helps to share the data between linux and windows. Configuration file is /etc/samba/smb.conf. There are some pre-defined section, i. global à use to define the global options, ii. Printers à use to share the printers, iii. homes à use the share the user's home directory.

Security=user à validation by samba username and password. May be there are other users also.

To allow certain share to certain user we should use valid users option.

smbpasswd à Helps to change user's smb password. -a option specifies that the username following should be added to the local smbpasswd file.

If any valid users option is not specified, then all samba users can access the shared data. By Default shared permission is on writable=no means read only sharing. Write list option is used to allow write access on shared directory to certain users or group members.


Q138. CORRECT TEXT

Share the /storage directory only to example.com members. These hosts should get read and write access on shared directory.

Answer and Explanation:

1. vi /etc/exports

/storage *.example.com(rw,sync)

2. service nfs start

3. service portmap restart

4. chkconfig nfs on

5. chkconfig portmap on

In Linux to share the data we use the /etc/exports file. Pattern is:

Path client(permission)

Shared Directory Path, Client can be single host or domain name or ip address. Permission should specify without space with client lists in parentheses.


Q139. CORRECT TEXT

One Package named zsh is dump on ftp://server1.example.com under /pub/updates directory and your FTP server is 192.168.0.254. Install the package zsh.

Answer and Explanation:

1. rpm -ivh ftp://server1/example.com/pub/updates/zsh-*

or

1. Login to ftp server : ftp ftp://server1.example.com using anonymous user.

2. Change the directory: cd pub and cd updates

3. Download the package: mget zsh-*

4. Quit from the ftp prompt : bye

5. Install the package

6. rpm -ivh zsh-*

7. Verify Either package installed or not : rpm -q zsh


Q140. CORRECT TEXT

One Logical Volume is created named as myvol under vo volume group and is mounted. The Initial Size of that Logical Volume is 400MB. Make successfully that the size of Logical Volume 200MB without losing any data. The size of logical volume 200MB to 210MB will be acceptable.

Answer and Explanation:

1. First check the size of Logical Volume: lvdisplay /dev/vo/myvol

2. Make sure that the filesystem is in a consistent state before reducing:

# fsck -f /dev/vo/myvol

3. Now reduce the filesystem by 200MB.

# resize2fs /dev/vo/myvol 200M

4. It is now possible to reduce the logical volume.

#lvreduce /dev/vo/myvol -L 200M

4. Verify the Size of Logical Volume: lvdisplay /dev/vo/myvol

5. Verify that the size comes in online or not: df -h