본문 바로가기

ETC/자격증

[리눅스마스터]제1502회 리눅스마스터 1급 2차 시험 작업식 풀이 2

반응형

14. 다음은 KVM 서비스를 구축하는 절차이다. ( 괄호 ) 안에 들어갈 적당한 내용을 적으시오.(6점)

(1) CPU 지원 여부 확인
# egrep “(vmx|svm)” /proc/cpuinfo

(2) 관련 패키지 설치
# yum groupinstall “Virtualization” “Virtualization Client” “Virutalization Platorm”

(3) 서비스 데몬 실행
# service ( ① ) start

(4) 네트워크 설정(네트워크 브리지 설정 포함)

(5) 가상머신 생성 및 게스트 OS 설치
# ( ② )

<조 건>
- "가상 머신 생성 및 게스트 OS"를 설치하는 경우 가상 머신 관리자는 X윈도 상에서 GUI 방식 툴을 통해 설정한다.

 

libvirtd : kvm 데몬

virtsh : CUI 기반의 가상머신을 관리하는 명령어

virt-manager : GUI 기반의 가상머신을 관리하는 명령어

 

① libvirtd

② virt-manager

 

15. NTP 서버의주설정파일의내용중일부내용이다. 다음조건에맞는설정을( 괄호) 안에넣으시오.(12점)

# cat ntp.conf
( ① ) nomodify notrap
( ② )
( ③ )
# service ( ④ ) start

<NTP 서버의 역할>
- NTP 클라이언트로 부터 요청을 받아 시간 정보를 응답할 NTP 서버 역할을 한다.
- NTP 서버들로 부터 시간 정보를 요청하여 받아올 NTP 클라이언트 역할을 한다.

 

<조 건>
- ① : NTP 서버 요청을 허용할 네트워크 대역을 192.168.0.0/255.255.255.0으로 설정한다.
- ② : NTP 서버에서 시간 정보를 time.kriss.re.kr로 요청한다.
- ③ : NTP 서버에서 시간 정보를 time.bora.net으로 요청한다.
- ④ : NTP 서비스 데몬을 시작한다.

 

ntpd - NTP 서버/클라이언트 데몬

ntp.conf : NTP 서버 설정 파일

 

[root@server1 ~]# find / -name ntp.conf
/etc/ntp.conf

 

[root@server1 ~]# vi /etc/ntp.conf
# For more information about this file, see the man pages
# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).

driftfile /var/lib/ntp/drift

# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default nomodify notrap nopeer noquery

# Permit all access over the loopback interface.  This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
restrict ::1

# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst

#broadcast 192.168.1.255 autokey        # broadcast server
#broadcastclient                        # broadcast client
#broadcast 224.0.1.1 autokey            # multicast server
#multicastclient 224.0.1.1              # multicast client
#manycastserver 239.255.254.254         # manycast server
#manycastclient 239.255.254.254 autokey # manycast client

<주요옵션>

restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap : 저 대역의 호스트는 쿼리만 날릴 수 있음

restrict [대상] [권한]

server : 시간을 받아올 NTP서버를 나열

server [타임 서버]

 

① restrict 192.168.0.0 mask 255.255.255.0

② server time.kriss.re.kr

③ server time.bora.net

④ ntpd

 

16. 다음은 iptables 명령어를 이용하여 방화벽 설정을 하는 예이다. 목적과 조건에 맞는 적당한 내용을 ( 괄호 ) 안에 넣으시오.(12점)

# iptables –A INPUT ( ① ) -s 192.168.10.1 –d 0/0 -j ACCEPT
# iptables –A INPUT ( ② ) -s 0/0 –d 192.168.10.1 -j ACCEPT
# iptables –A INPUT ( ③ ) -s 0/0 –d 192.168.10.1 -j ACCEPT

<목 적>
- 자신의 서버에서 외부로는 ping 테스트가 되고 외부에서는 자신의 서버쪽으로 ping 테스트가 되지 않도록 방화벽에 등록하고 싶다.

 

<조 건>
- iptables 명령어를 수행하는 서버의 IP는 192.168.10.1이다.
- INPUT 체인의 기본 정책은 DROP 이다.
- ① : 프로토콜은 icmp이며 icmp echo request 패킷이 외부로 나가는 것에 대해 허용한다.
- ② : 프로토콜은 icmp이며 외부에서 들어오는 icmp echo reply 패킷에 대해서 허용한다.
- ③ : 프로토콜은 icmp이며 외부에서 들어오는 icmp destination-unreachable 패킷에 대해서 허용한다.

 

-p : 특정 프로토콜 조건

 

 

[root@server1 ~]# man iptables

 

 [!] -p, --protocol protocol
              The protocol of the rule or of the packet to check.  The specified protocol can be  one  of  tcp,
              udp, udplite, icmp, icmpv6,esp, ah, sctp, mh or the special keyword "all", or it can be a numeric
              value, representing one of these protocols or a different one.  A protocol name from  /etc/proto‐
              cols  is  also allowed.  A "!" argument before the protocol inverts the test.  The number zero is
              equivalent to all. "all" will match with all protocols and is taken as default when  this  option
              is omitted.  Note that, in ip6tables, IPv6 extension headers except esp are not allowed.  esp and
              ipv6-nonext can be used with Kernel version 2.6.11 or later.  The number zero  is  equivalent  to
              all,  which means that you cannot test the protocol field for the value 0 directly. To match on a
              HBH header, even if it were the last, you cannot use -p 0, but always need -m hbh.

 

icmp match options:
[!] --icmp-type typename        match icmp type
[!] --icmp-type type[/code]     (or numeric type or type/code)

 

① -p icmp --icmp-type echo request

② -p icmp --icmp-type echo reply

③ -p icmp --icmp-type echo destination-unreachable

반응형