본문 바로가기

전체 글22

NPM 이용시 "must use TLS 1.2 or higher" 메시지 해결 npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher npm 을 이용하여 패키지를 설치할때 위와 같은 메시지가 나올때가 있다 npm config set registry https://registry.npmjs.org/ 위와 같은 명령어를 입력하여 해결이 가능하다 기존의 주소가 http 에서 https 로 바뀌어 해결되게 된다. 2022. 8. 20.
ModSecurity에 OWASP의 CRS(Core Rule Set) 추가하기 1. OWASP 의 CRS 다운받기 https://coreruleset.org/installation/ 에서 압축파일을 다운로드 받고 풀어서 nginx conf 하위 폴더에 넣어준다 2. modsecurity.conf 에 추가 Include coreruleset-3.3.2/crs-setup.conf Include coreruleset-3.3.2/rules/*.conf 3. crs-setup.conf의 주석 풀어주기 SecDefaultAction "phase:1,log,auditlog,pass" SecDefaultAction "phase:2,log,auditlog,pass" SecDefaultAction "phase:1,log,auditlog,deny,status:403" SecDefaultAction ".. 2022. 8. 19.
ModSecurity + Nginx 실적용 테스트 해보기 1. ModSecurity 설정파일 수정 modSecurity.conf 파일을 수정한다. modSecurity.conf 파일은 기존 폴더에서 복사해서 가져온다 현재 필자의 경로는 nginx를 컴파일하여 설치했기 때문에 /usr/local/nginx/conf 에 위치해 있다 SecRuleEngine DetectionOnly 위와 같은 문구를 SecRuleEngine On 로 변경한다. 2. 추가되는 룰 내용 SecRule ARGS:testparam "@contains test" "id:1234,deny,status:403" 위와 같은 내용을 추가해주고 Nginx 를 재시작한다. 3. 실제 적용 확인 주소창을 통해 적용된 웹서버로 다음과 같이 접근해본다 https://abc.com/index.html?tes.. 2022. 8. 19.
ModSecurity: StatusEngine call failed 문제 임시해결 2022/08/18 10:15:17 [notice] 19676#0: ModSecurity for nginx (STABLE)/2.9.1 (http://www.modsecurity.org/) configured. 2022/08/18 10:15:17 [notice] 19676#0: ModSecurity: APR compiled version="1.4.8"; loaded version="1.4.8" 2022/08/18 10:15:17 [notice] 19676#0: ModSecurity: PCRE compiled version="8.32 "; loaded version="8.32 2012-11-30" 2022/08/18 10:15:17 [notice] 19676#0: ModSecurity: LIBXML comp.. 2022. 8. 18.
CentOS7 / nginx / mod_security / 컴파일 설치 mod_security 파일을 다운로드 받는다 $ wget https://www.modsecurity.org/tarball/2.9.1/modsecurity-2.9.1.tar.gz 압축을 해제한다 $ tar -zxvf modsecurity-2.9.1.tar.gz 해당 경로로 이동한다 $ cd modsecurity-2.9.1 $ ./configure --enable-standalone-module $ make nginx 다운로드 받기 (22-08-18일 기준으로 이것보다 바로 위버전은 컴파일시 에러 발생 - stable 버전 나와야 할듯) ㄴ https://nginx.org/en/download.html $ wget https://nginx.org/download/nginx-1.22.0.tar.gz $ ta.. 2022. 8. 18.
DNS 상세정보 조회 웹사이트 DNS 정보를 업데이트 하고 난뒤 해당 정보가 전파 되는지를 바로 확인 가능한 사이트가 있었다 CNAME 를 비롯해서 TXT 라던지 DNS 관련 여러 값들도 해외 기준으로 바로 조회가 가능하다 https://www.whatsmydns.net/ DNS Propagation Checker - Global DNS Checker Tool Instant DNS Propagation Check. Global DNS Propagation Checker - Check DNS records around the world. www.whatsmydns.net 2022. 8. 3.
백준 nodejs 기준 기본코드 실행소스 백준에서 알고리즘 문제를 풀때 nodejs 를 이용할때 사용되는 소스코드이다. 제출용 + 로컬 (리눅스) 양쪽에서 둘다 동작한다 const fs = require("fs"); const filePath = process.platform === "linux" ? "/dev/stdin" : "./input.txt"; let input = fs.readFileSync(filePath).toString().split("\n"); //console.log(input); input = input[0]; //console.log(input); input = input.split(" ").map((item) => +item); //console.log(input); exe(input[0], input[1]); func.. 2022. 8. 3.
mysqld: Can not perform keyring migration 문제 해결 mysqld: Can not perform keyring migration : Invalid --keyring-migration-source option. 2022-07-23T21:57:08.682603Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29) starting as process 6452 2022-07-23T21:57:08.699271Z 0 [ERROR] [MY-011084] [Server] Keyring migration failed. 2022-07-23T21:57:08.699317Z 0 [ERROR] [MY-010119] [Server] Aborting 2022-07-23T21:57:08.700027Z 0 [System] [.. 2022. 7. 24.
IP address could not be resolved: Name or service not known 로그 해결 mysql 로그 기록을 보던중 이상한 내용이 있는것을 발견함 위와 같은 내용이 반복되고 있음 알고보니 접속자의 아이피를 호스트네임으로 변환하려는데 그게 되지 않아서 발생하는 문제 my.cnf 파일에 다음과 같은 내용을 추가하여 해결함 [mysqld] skip-external-locking skip-host-cache skip-name-resolve 2022. 7. 24.