본문 바로가기

ETC/자격증

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

반응형

11. 다음은 웹서버에 대한 설정이다. ( 괄호 ) 안에 알맞은 내용을 적으시오.(9점)

order ( ① ), ( ② )
	allow from .example.com
	deny from ( ③ )

<조 건>
- example.com 도메인을 제외한 모든 도메인으로부터 접근을 거부한다.

 

- Order : 해당 디렉터리에 대해 IP주소 및 도메인에 대한 필터링 순서를 설정

[root@server1 ~]# vi /usr/local/apache/conf/httpd.conf

 

<허용>

Order deny,allow

Deny from all

 

<차단>

Order allow,deny

Allow from all

 

① allow② deny③ all

 

12. 다음은 OpenLDAP 에대한 내용이다. 다음 조건에 맞게 ( 괄호 ) 안에 알맞은 내용을 적으시오.(6점)

/etc/openldap/slapd.conf
suffix "dc=( ① ), dc=( ② )
rootdn "cn=Manager,dc=( ① ),dc=( ② )"

<조 건>
- 조직의 도메인을 설정한다.
- 도메인은 ihd.org 도메인을 사용하였다.

 

- c : 국가 이름
- st : 주(한국의 도) 이름
- o : 조직(회사) 이름
- ou : 조직의 부서 이름
- cn : 일반적으로 이름과 성의 조합
- sn : 성을 나타냄
- dc : 도메인 네임의 요소
- mail : email 주소

- ldap.conf : OpenLDAP 환경 설정 파일

 

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

 

[root@server1 ~]# vi /etc/openldap/ldap.conf
...

suffix          "dc=example,dc=com"
rootdn          "cn=manager,dc=example,dc=com"

...

 

① ihd

② org

 

13. 다음은 메일 관련 작업을 순차적으로 나열한 것이다. ( 괄호 ) 안에 알맞은 내용을 적으시오.(9점)

# vi ( ① )
admin@linux.co.kr posein
admin@windows.co.kr yuloje
# ( ② ) ( ① ) < ( ① )

 

virtusertable : 특정 이메일 주소로 받은 메일을 다른 사용자에게 할당할때 사용

[root@server1 ~]# find / -name virtusertable
/etc/mail/virtusertable

 

[root@server1 ~]# vi /etc/mail/virtusertable
# A domain-specific form of aliasing, allowing multiple virtual domains to be
# hosted on one machine.
#
# info@foo.com  foo-info
# info@bar.com  bar-info
# joe@bar.com   error:nouser 550 No such user here
# jax@bar.com   error:5.7.0:550 Address invalid
# @baz.org      jane@example.net
#
# then mail addressed to info@foo.com will be sent to the address foo-info,
# mail addressed to info@bar.com will be delivered to bar-info, and mail
# addressed to anyone at baz.org  will be sent to jane@example.net, mail to
# joe@bar.com will be rejected with the specified error message, and mail to
# jax@bar.com will also have a RFC 1893  compliant error code 5.7.0.
#
# The username from the original address is passed as %1 allowing:
#
# @foo.org      %1@example.com
#
# Additionally, if the local part consists of "user+detail" then "detail" is
# passed as %2 and "+detail" is passed as %3  when a match against user+* is
# attempted, so entries like
#
# old+*@foo.org new+%2@example.com
# gen+*@foo.org %2@example.com
# +*@foo.org    %1%3@example.com
# X++@foo.org   Z%3@example.com
# @bar.org      %1%3
#
# Note: to preserve "+detail" for a default case (@domain) %1%3 must be used
# as RHS. There are two wildcards after "+": "+" matches only a non-empty
# detail, "*" matches also empty details, e.g., user+@foo.org  matches#
# +*@foo.org but not ++@foo.org. This can be used to ensure that the
# parameters %2 and %3 are not empty.
#
# All the host names on the left hand side (foo.com, bar.com, and baz.org)
# must be in class {w} or class {VirtHost}. The latter can be defined by the
# macros VIRTUSER_DOMAIN or VIRTUSER_DOMAIN_FILE (analogously to
# MASQUERADE_DOMAIN and MASQUERADE_DOMAIN_FILE). If VIRTUSER_DOMAIN or
# VIRTUSER_DOMAIN_FILE is used, then the entries of class {VirtHost} are
# added to class {R}, i.e., relaying is allowed to (and from) those domains.

 

makemap hash : virtusertable 적용 명령어

 

① /etc/mail/virtusertable

makemap hash

반응형