12 03 2014
Free Download Latest 2014 Pass4sure&Lead2pass Red Hat RHCE EX300 Exam Questions (16-20)
mavis | Redhat Dumps, RHCE EX300 Dumps
Question 16
Configure ssh to allow user harry to access, reject the domain t3gg.com (172.25.0.0/16) to access.
Answer:
# yum install -y sshd
# chkconfig sshd on
# vim /etc/hosts.deny
sshd: 172.25.0.0/16
# service sshd restart
Use iptables:
# chkconfig iptables on
# iptables -F
# iptables -X
# iptables -Z
# iptables -nvL
# iptables -A INPUT -s 172.25.0.0/16 -p tcp –dport 22 -j REJECT
# services iptables save
# iptables -nvL
# cat /etc/services (check port)
Question 17
Configure the ftp to allow anonymously download the directory /var/ftp/pub, and reject the domain t3gg.com to access.
Answer:
# yum install -y vsftpd
# chkconfig vsftpd on
# services vsftpd start
# vim /etc/hosts.deny
vsftpd: 172.25.0.0/16
OR
# iptables -A INPUT -s 172.25.0.0/16 -p tcp -dport 20:21 -j REJECT
# services iptables save
Question 18
Shutdown the /root/cdrom.iso under /opt/data, and set as boot automatically mount.
Answer:
# cd /opt/
# mkdir data
# mount -t iso9660 -o loop /root/cdrom.iso /opt/data
# vim /etc/fstab
/root/cdrom.iso /opt/data iso9660 defaults,loop 0 0
# mount -a
# mount
Question 19
Configure the web server, which can be accessed by
http://station.domain30.example.com.
Answer:
# yum install -y httpd
# chkconfig httpd on
# cd /etc/httpd/conf/
# vim httpd.conf
NameVirtualHost 172.24.30.5:80
<VirtualHost 172.24.30.5:80>
DocumentRoot /var/www/html/
ServerName tation.domain30.example.com
</VirtualHost>
# service httpd restart
Question 20
Configure the web server, and implement the virtual host.
http://www.domain30.example.com can access the pages under the directory:
http://ip/dir/example.html. And make sure, http://station.domain30.example.com can also
access the previous content.
Answer:
# mkdir -p /www/virtual
# cd /www/virtual
# wget http://ip/dir/example.com
# cp example.com index.html
# se manage fcontext -a -t httpd_sys_content_t ‘/www(/.*)?’
restorecon -vRF /www
# vim /etc/httpd/conf/httpd.conf (Add new VirtualHost)
<VirtualHost 172.24.30.5:80>
DocumentRoot /www/virtual/
ServerName www.domain30.example.com
</VirtualHost>
# chcon -R –reference=/var/www/html/ /www/
# service httpd restart
Use elinks to test.
OR
# mkdir -p /www/virtual
# cd /www/virtual
# wget http://ip/dir/example.html
# mv example.html index.html
# chcon -R –reference=/var/www/html/ /www/
# ls -ldZ /www/virtual
# vim /etc/httpd/conf/httpd.conf
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /var/www/html/
ServerName station.domain30.example.com
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /www/virtual/
ServerName www.domain30.example.com
</VirtualHost>
# service httpd restart
If you want to pass the Red Hat RHCE EX300 exam sucessfully, recommend to read latest Red Hat RHCE EX300 Dumps full version.
EX300 Download, EX300 Dumps, EX300 Exam Questions, EX300 PDF, EX300 Practice Exams, EX300 Practice Tests, EX300 VCE, Free EX300, Pass4sure EX300, Red Hat RHCE EX300