Information2017. 9. 28. 11:50

서버로 동작시켜야되므로 인증서부터 만들어야 함.


[self-signed 인증서 만들기]

ec2-user@aws:~/certs>openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes

Generating a 2048 bit RSA private key

..........+++

.............................+++

writing new private key to 'key.pem'

-----

You are about to be asked to enter information that will be incorporated

into your certificate request.

What you are about to enter is what is called a Distinguished Name or a DN.

There are quite a few fields but you can leave some blank

For some fields there will be a default value,

If you enter '.', the field will be left blank.

-----

Country Name (2 letter code) [XX]:KR

State or Province Name (full name) []:도시 이름

Locality Name (eg, city) [Default City]:행정구

Organization Name (eg, company) [Default Company Ltd]:회사 이름 혹은 단체 이름

Organizational Unit Name (eg, section) []: 담당부서 이름

Common Name (eg, your name or your server's hostname) []: 도메인 입력(테스트 용도일시 localhost가 무난)

Email Address []:이메일 주소 아무거나


[SSL 서버 실행]

ec2-user@aws:~/certs>openssl s_server -key key.pem -cert cert.pem -accept 1470



[클라이언트에서 접속하기]

이제 외부 ssl 클라이언트에서 openssl 실행한 PC의 IP주소(포트번호는 1470)로 접속하면 됨.



[웹브라우저로 테스트 방법]

1. 웹용으로 서버 실행

ec2-user@aws:~/certs>openssl s_server -key key.pem -cert cert.pem -accept 1470 -www


2. 웹브라우저에 다음과 같은 포맷으로 주소 입력 후 접속하기, x.x.x.x는 IP주소

https://x.x.x.x:1470




'Information' 카테고리의 다른 글

윈도우즈 10 DHCPv6 버그 수정(?)  (1) 2017.11.16
Reverse DNS 조회 및 AWS EIP 등록 방법  (0) 2017.11.08
AWS Amazon Linux timezone 변경  (0) 2017.09.28
한글이름  (0) 2017.09.08
windows vim(7.4)에서 diff 사용  (0) 2014.07.17
Posted by OTOTO
Information2017. 9. 28. 11:02

기본으로 설치하면 timezone이 UTC(세계 협정시)임


다른거 없고 아래 링크 안내에 따르면 됨.


http://docs.aws.amazon.com/ko_kr/AWSEC2/latest/UserGuide/set-time.html




서울 리전에 설치한거 기준으로 간략히 정리하면 사용할 표준시간대는 당연히 "Asia/Seoul"이고 아래와 같이 진행


1. ZONE 변경하기

ec2-user@aws:~>sudo vim /etc/sysconfig/clock


ZONE="Asia/Seoul"

UTC=true


2. ntp 서버 변경

ec2-user@aws:~>sudo vim /etc/ntp.conf


#server 0.amazon.pool.ntp.org iburst

#server 1.amazon.pool.ntp.org iburst

#server 2.amazon.pool.ntp.org iburst

#server 3.amazon.pool.ntp.org iburst

server kr.pool.ntp.org

server time1.daum.net

server time2.daum.net


3. 인스턴스에게도 알려주기

ec2-user@aws:~>sudo ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime


4. 리부팅

ec2-user@aws:~>sudo reboot



#참고

ntpd 정상 동작을 위해서는 VPC 보안 그룹에 UDP 123 IN/OUT 모두 개방 필요 ^^



#확인

대략 아래와 같이 표시되면 정상적으로 완료된거임.

ec2-user@aws:~>date

Thu Sep 28 11:02:36 KST 2017

ec2-user@aws:~>ntpstat

synchronised to NTP server (106.247.248.106) at stratum 3 

   time correct to within 54 ms

   polling server every 64 s

ec2-user@aws:~>

'Information' 카테고리의 다른 글

Reverse DNS 조회 및 AWS EIP 등록 방법  (0) 2017.11.08
openssl s_server example  (0) 2017.09.28
한글이름  (0) 2017.09.08
windows vim(7.4)에서 diff 사용  (0) 2014.07.17
sftp umask 설정  (0) 2013.07.24
Posted by OTOTO