전체 글 썸네일형 리스트형 [AWS] ALB를 사용하여 소스 IP를 제한하는 방법(IP Blocking) ALB를 사용하여 소스 IP를 제한하는 방법(IP Blocking) ALB 고정 응답 반환 설정 [로드 밸런싱] > [로드밸런서] > 로드 밸런서 선택 > [리스너] > 리스너 선택 > [규칙 보기/편집] 규칙 추가 > [규칙 삽입] 고정 응답 반환 응답 코드 : 599 콘텐츠 유형 : text/plain 응답 본문 : 페이지 차단(PAGE BLOCK) 접속 차단 - 웹 보안 정책 보안(Blocked - Violation of Web Security Policy) 접속 테스트 https://sangchul.kr curl -I https://sangchul.kr HTTP/2 599 server: awselb/2.0 date: Fri, 30 Jul 2021 07:09:01 GMT content-type: t.. 더보기 [AWS] AWS CloudWatch 경보를 Slack으로 보내는 방법_ver2 AWS CloudWatch 경보를 Slack으로 보내는 방법 시스템 구성 이미지 출처 : https://medium.com/analytics-vidhya/generate-slack-notifications-for-aws-cloudwatch-alarms-e46b68540133 1. Amazon SNS 1-1. 주제 생성 - 이름 : cloudwatch-notification 1-2 구독 메일 확인 1-3 메시지 게시(메시지 발송 테스트) 2. Slack webhooks url 생성 slack webhooks(incoming webhooks) 생성 방법 - https://sangchul.kr/784 #cluodwatchalert https://hooks.slack.com/services/T018562TM6A.. 더보기 [리눅스] PHP redis 확장(Extension)을 설치하는 방법 PHP redis 확장(Extension)을 설치하는 방법 redis 설치 $ yum -y install gcc gcc-c++ make jemalloc tcl $ yum install redis $ systemctl --now enable redis $ redis-cli -h 127.0.0.1 -p 6379 ping redis extension 모듈 설치 phpredis 패키지 다운로드 $ wget https://github.com/phpredis/phpredis/archive/develop.zip $ unzip develop.zip $ cd phpredis-develop PHP 확장 컴파일, 구성 환경, 컴파일 #PHP 확장 컴파일 $ /usr/local/php/bin/phpize #구성 환경 $ ./.. 더보기 [리눅스] Rkhunter (Rootkit Hunter) 설치 Rkhunter (Rootkit Hunter) 설치 : rkhunter로 해킹 여부 체크하기 http://www.rootkit.nl/projects/rootkit_hunter.html 1. 다운로드 [root@lamp01 src]# wget http://ncu.dl.sourceforge.net/project/rkhunter/rkhunter/1.4.0/rkhunter-1.4.0.tar.gz 2. rootkit 설치 [root@lamp01 src]# tar xvfz rkhunter-1.4.0.tar.gz [root@lamp01 src]# cd rkhunter-1.4.0 [root@lamp01 rkhunter-1.4.0]# ./installer.sh --layout default --install 3. roo.. 더보기 [리눅스] 취약점을 방지하기 위한 보안 HTTP 헤더를 설정하기 취약점을 방지하기 위한 보안 HTTP 헤더를 설정하기 X-Content-Type-Options ###Apache Header set X-Content-Type-Options nosniff ###Nginx add_header X-Content-Type-Options nosniff; X-XSS-Protection ###Apache Header set X-XSS-Protection "1; mode=block" ###Nginx add_header X-XSS-Protection "1; mode=block"; X-Frame-Options ###Apache Header always append X-Frame-Options DENY ###Nginx add_header X-Frame-Options “DENY”; HTTP.. 더보기 [리눅스] MySQL 클라이언트 설치 MySQL 클라이언트 설치 mysql57-community-release-el7-11.noarch.rpm 다운로드 및 설치 https://dev.mysql.com/downloads/repo/yum/ $ wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm $ rpm -ivh mysql57-community-release-el7-11.noarch.rpm mysql57.repo 수동으로 생성 cat 더보기 [리눅스] PHP 7.X 버전에서 몽고DB 연동 PHP 7.X 버전에서 몽고DB 연동(확장 프로그램 설치) $ git clone https://github.com/mongodb/mongo-php-driver.git $ cd mongo-php-driver/ $ git submodule update --init $ /usr/local/php/bin/phpize $ ./configure --with-php-config=/usr/local/php/bin/php-config $ make all $ make install --output-- PATH="$PATH:/sbin" ldconfig -n /usr/local/src/mongo-php-driver/modules ------------------------------------------------------.. 더보기 [리눅스] OpenSSL로 파일을 암호화/복호화하기 OpenSSL로 파일을 암호화/복호화하기 테스트 환경 $ cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) $ getconf LONG_BIT 64 OpenSSL 버전 $ openssl version OpenSSL 1.0.2k-fips 26 Jan 2017 지원되는 Ciphers(Cipher Types|Valid ciphername values) openssl enc -ciphers(? 알 수 없는 옵션으로 정상적인 옵션을 출력했다) $ openssl enc -ciphers unknown option '-ciphers' options are -in input file -out output file -pass pass phrase source -e .. 더보기 이전 1 ··· 95 96 97 98 99 100 101 다음