Skip to content

?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

보안서버를 구축하게 되면 아래와 같이 구동 시에 비밀번호를 입력해야 합니다. 이때 간단한 설정으로 자동으로 비밀번호를 입력할 수 있습니다.

가. 비밀번호 자동 입력

[root@smson bin]# ./apachectl startssl
[Thu Oct 30 15:18:43 2008] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Apache/1.3.33 mod_ssl/2.8.24 (Pass Phrase Dialog)
Some of your private key files are encrypted for security reasons.
In order to read them you have to provide us with the pass phrases.

Server analysis.wsos.co.kr:443 (RSA)
Enter pass phrase:

Ok: Pass Phrase Dialog successful.
./apachectl startssl: httpd started

[root@smson ssl]# vi pw.sh
#!/bin/sh
echo "password"
[root@smson ssl]# vi /usr/local/apache-ssl/conf/httpd.conf
<IfModule mod_ssl.c>
#   Pass Phrase Dialog:
#   Configure the pass phrase gathering process.
#   The filtering dialog program (`builtin' is a internal
#   terminal dialog) has to provide the pass phrase on stdout.
#SSLPassPhraseDialog  builtin
SSLPassPhraseDialog  exec:/usr/local/apache-ssl/conf/ssl/pw.sh

 나. 부팅시 자동 시작

 리눅스가부팅 할때 /etc/rc* 에 있는 파일들을 실행합니다. rc 뒤에 붙은 숫자는 run level을 뜻합니다. 리눅스는 부팅 시에 run level을 지정할 수 있는데 일반적인 작업에서 사용되는 run level은 3입니다. 아래와 같이 간단한 스크립트를 작성하여 링크를 시켜 주시면 됩니다.

[root@smson bin]# cat apachectlstartssl
#!/bin/sh
/usr/local/apache-ssl/bin/apachectl startssl
[root@smson bin]# cd /etc/rc
rc          rc1.d       rc3.d       rc5.d       rc.d        rc.sysinit 
rc0.d       rc2.d       rc4.d       rc6.d       rc.local   
[root@smson bin]# cd /etc/rc3.d/
[root@smson rc3.d]# rm -rf S99apache
[root@smson rc3.d]# ln -s /usr/local/apache-ssl/bin/apachectlstartssl S99apache
[root@smson rc3.d]# ls -al
total 12
drwxr-xr-x    2 root     root         4096 Oct 30 17:50 .
drwxr-xr-x   10 root     root         4096 Oct 30 17:30 ..
lrwxrwxrwx    1 root     root           15 Jun 17  2005 K03rhnsd -> ../init.d/rhnsd
...
lrwxrwxrwx    1 root     root           43 Oct 30 17:50 S99apache -> /usr/local/apache-ssl/bin/apachectlstartssl
lrwxrwxrwx    1 root     root           41 Jun 17  2005 S99mysql -> /usr/local/mysql/share/mysql/mysql.server
[root@smson rc3.d]#

List of Articles
번호 제목 글쓴이 날짜 조회 수
88 CentOS Portsentry 1.2 소스설치 오류 ADMINPLAY 2014.01.19 7052
87 PHP 보안의 약방의 감초 open_basedir ADMINPLAY 2014.01.02 7520
86 CentOS 5.2 32bit 에 2.6.27.4 커널 + iptables 1.4.2 + c... ADMIN 2008.11.10 7818
85 wowhacker.com ADMIN 2008.11.11 8065
84 파일 퍼미션 설정을 통한 로컬 공격 방지 l2zeo 2010.03.08 8168
83 lsof 활용 가이드 ADMINPLAY 2009.11.30 8313
82 서버종합점검[리눅스] ADMINPLAY 2009.05.28 8367
81 iptables 기본 ADMINPLAY 2009.05.22 8386
80 SSH 공격막아내기 방법 l2zeo 2010.03.08 8391
79 SSH(Security SHell) 보안쉘 ADMINPLAY 2009.10.20 8404
78 Tcpdump 용어 정리 ADMINPLAY 2010.01.30 8505
77 ZONE-H.KR ADMIN 2008.11.11 8542
76 pam_abl 을 통한 SSH 무작위 공격 방어 ADMINPLAY 2009.06.04 8731
75 LINUX 해킹당했을 때 대처요령 l2zeo 2010.03.08 8731
74 시스템 로그를 메일로 - logcheck file ADMINPLAY 2009.09.08 8772
73 서버의 iptable 보안설정 일부분 ADMINPLAY 2009.05.28 8786
72 Kernel 2.4.23 버전 이하에 나온 ptrace 버그에 관한 사항 ADMINPLAY 2009.12.13 8797
71 iptables 옵션 및 상태 추적 테이블 및 rule ADMINPLAY 2009.11.30 8851
70 iptables 설정, centos64 설치 간단셋팅 ADMINPLAY 2009.05.28 8854
69 홈페이지 보안 강화 도구(CASTLE) 보급 안내 1 file ADMINPLAY 2010.01.22 8925
Board Pagination Prev 1 2 3 4 5 Next
/ 5

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234