본문 바로가기

Linux3

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.
yum(dnf) update 시 'Cannot download All mirrors were tried' 패키지 업데이트시 특정 모듈에서 다운로드가 안되면서 Cannot download All mirrors were tried 라는 메시지가 포함된 에러가 나올때가 있다 또한 커스텀 repo 설정이 안되는 경우도 있는데 이때 이렇게 해결했다 $ yum remove epel-release -y $ yum update 오랜만에 yum update (dnf update) 를 실행할시 업데이트가 안되는 문제가 발생할 수 있는데 epel-release repo 를 위 명령어로 삭제하고 다시 yum update 를 치니까 정상적으로 다운로드가 됨 2022. 7. 23.
centOS 8 에서 repo 사용시 'AppStream' 에러해결 Error: Failed to download metadata for repo 'AppStream' yum update 또는 dnf update 사용시 위와 같은 에러가 발생한다 [root@localhost ~]# cd /etc/yum.repos.d/ [root@localhost yum.repos.d]# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* [root@localhost yum.repos.d]# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* 레포 경로로 들어가 위와 같은 형태로 레포를 교체해주면.. 2022. 7. 23.