>> Read No. 47730 article  
ssl 관련하여 글을 올립니다.

등록 2002-04-25 16:43:00     조회 1
이름 윤훈    

		몇 가지 궁금한 점이 있어서 글을 올립니다.
 
리눅스머신에서 다음과 같은 환경 설정을 했습니다.
 
 open_SSL 설치
 
/tmp에 open_ssl 소스를 풀고 그 디렉토리로 가서
./config --prefix=/usr/local --openssldir=/usr/local/openssl
./make
./make test
./make install
 
vi /usr/local/openssl/openssl.cnf
 
CA_default 부분에다가 /usr/local/openssl/MyCA 수정
 
usr_cert부분의 nsCertType에서 필요한 부분을 열어준다(#제거)
server 랑 client email objsign
 
keyUsage 부분의 #을 풀어준다.
 
mkdir /usr/local/openssl/MyCA
mkdir /usr/local/openssl/MyCA/certs
mkdir /usr/local/openssl/MyCA/crl
mkdir /usr/local/openssl/MyCA/newcerts
mkdir /usr/local/openssl/MyCA/private
echo "01" > /usr/local/openssl/MyCA/serial
touch /usr/local/openssl/MyCA/index.txt
 
rootCA의 비밀키 생성
openssl genrsa -des3 -out ca.key 1024
 
self sign한 인증서 생성
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
 
cp ca.key /usr/local/openssl/MyCA/private/cakey.pem
cp ca.crt /usr/local/openssl/MyCA/cacert.pem
 
 패키지 풀기(apache, mod_ssl, php를 /tmp에 푼다) 
 
위의 3개 꼭 >tar zxvf [filename] 형태로 푼다.
 
    cd apache-1.3.x
    ./configure
 
    $ cd mod_ssl-2.6.2-1.3.12
    $ ./configure
          --with-apache=../apache_1.3.12
    $ cd ..
 
    #  PHP를 컴파일 하기 전의 아파치 사전 설정 
    $ cd apache_1.3.12
    $ ./configure
          --prefix=/usr/local/apache <= 설치할 곳
    $ cd ..
 
    # PHP컴파일 하기 (DB,imap,gd,apache)
    $ cd ../php-4.0.0
    $ CFLAGS='-O2(영문대문자O) -I(영문대문자I)/usr/local/openssl/include'
      ./configure
          --with-apache=../apache_1.3.12
          --with-mysql=/usr/local/mysql  <= 사용자가 설치한 위치
          --enable-memory-limit=yes
          --enable-debug=no
    $ make
    $ make install
    $ cd ..
 
    # Apache 와 mod_ssl, PHP3, etc...컴파일하기.(마무리 하기)
    $ cd apache_1.3.x
    $ SSL_BASE=/usr/local
      ./configure
          --prefix=/usr/local/apache
          --enable-module=ssl
          --activate-module=src/modules/php4/libphp4.a
          --enable-module=php4
    $ make
    $ make certificate
     (상식 수준에서 설정...Common Name은 공인_IP를 넣어준다. 나중에
만들어도 될거 같은데...)
    $ make install
 
/usr/local/apache/conf/httpd.conf 파일을 수정
특정 포트(443)로 들어오는 것만 보안 웹엔진을 기동시키려고 합니다.
 
① Section 1 (Global Environment)부분에서
Listen 192.168.1.1:80
Listen 192.168.1.1:443
Listen 외부_IP:443
추가
 
② Section 2 부분에서 Port 80 인지 확인
 
   ServerName 192.168.1.1
   ServerName 외부_IP
 
ServerAdmin 부분을 수정(잘 알아서 하자...문제가 있을때 멜로 날라오니
까..)
 
③ Section 3 부분에서
<VirtualHost 외부_IP:443>
   SSLEngine on
   SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
   SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
   DocumentRoot /usr/local/apache/htdocs_ssl_out
   ServerName [외부_IP]
   ServerAdmin zip90028 at infino.co.kr
   ErrorLog /usr/local/apache/logs/error_log
   TransferLog /usr/local/apache/logs/access_log
   SSLCACertificateFile /usr/local/apache/conf/ssl.crt/server.crt
   SSLVerifyClient 2
</VirtualHost>
 
<VirtualHost 192.168.1.1:443>
   SSLEngine on
   SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
   SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
   DocumentRoot /usr/local/apache/htdocs_ssl
   ServerName 192.168.1.1
   ServerAdmin zip90028 at infino.co.kr
   ErrorLog /usr/local/apache/logs/error_log
   TransferLog /usr/local/apache/logs/access_log
   SSLCACertificateFile /usr/local/apache/conf/ssl.crt/server.crt
   SSLVerifyClient 2
</VirtualHost>
 
저장후 나온다.
 
443포트에 대한 디렉토리 설정
 
mkdir /usr/local/apache/htdocs_ssl
mkdir /usr/local/apache/htdocs_ssl_out
두 디렉토리 안에다가 필요한 html파일을 넣어준다.
 #하나의 리눅스 머신안에 웹서버와 rootCA가 같이 있는 형태입니다.
 
웹서버의 비밀키 생성
openssl genrsa -des3 -out server.key 1024
 
웹서버가 rootCA에 보낼 인증요구서 생성
openssl req -new -days 365 -key server.key -out server.csr
 
rootCA가 웹서버에게 줄 인증서를 생성
openssl ca -in server.csr -out server.crt -
config /usr/local/openssl/openssl.cnf
 
웹서버의 키와 인증서를 다음에 위치시킨다.
cp server.key /usr/local/apache/conf/ssl.key/server.key
cp server.crt /usr/local/apache/conf/ssl.crt/server.crt
 
###
이 다음에 클라이언트(브라우저:익스플로어)를 위한 인증서를 만들고 그
인증서와 rootCA의 인증서를
클라이언트에 설치해야 하는데(위의 설정 중에서 SSLVerifyClient 2라는
옵션때문에) rootCA인증서는
인증서 설치 마법사를 통해서 설치를 했는데 클라이언트의 인증서를 어떻
게 만드는 지에 대한 방법과
클라이언트의 인증서도 똑같이 인증서 설치 마법사를 통해 어느부분에 설
치를 해야 하는 지 몰라서 글을 올립니다.
 
답변 꼭 부탁드립니다. 
###
이름
암호
Register [ localhost 목록보기 윗글 아랫글
글쓰기
답장쓰기 수정 삭제
정규표현식 [ 상세 검색 ]
페이지로딩: [ 0.47 초 ] 작업시간: [ 0.02 초 ]

Copyleft 1999-2026 by JSBoard Open Project
Theme Designed by IDOO All right reserved
[TOP]

적수네 동네
+
| 적수네 동네
| 공부방
| 리눅스 잡지 서고
| LSN 소스
| 링크 모음
+---+
게시판
+
| 떠들어보세!
| 질문과 답변
| 새소식과 정보
| 1원짜리 팁?
| 대화방
+---+
칼럼?
+
| 세하 훔쳐보기
| Welcome2nite
| 혜진의 염장판
+---+
리눅스 상표권
+
| 반대 서명란
| 토론 게시판
+---+
GNU
+
| GNU 선언문
| GNU GPL
| GNU 미러 목록
+---+
프로젝트?
+
| 리눅스카운터
| RC5DES
| 실질헌법 제작
+---+
커널 소식
+
| 안정 버젼: 2.4.14
+---+
테마 선택
+
LSN 방송국?
+
| OFF AIR
+---+
회원
+
| 로그인
+---+
[ 적수네 동네 ] [ 리눅스 상표권 독점 반대 ] [ 한글 리눅스 문서 프로젝트 ] [ KrLine ] [ 사랑넷 ] [ Valid HTML 4.0! ] [ SlashDot ] [ Freshmeat ]
Copyleft (C) 1998-2001 Byeong-Chan Kim . License
TIME: 1791522937
System by WYZsoft, HDD by I.O.Linux, Mizi Research, Embryo, WOWLINUX, Domain by SarangNet, Network by KrLine.