iptables -A OUTPUT -p udp -j DROP
확인
iptables -L
다운
wget http://www.ossec.net/files/ui/ossec-wui-0.3.tar.gz
압축 풀기
$ tar -zxvf ossec-wui-0.3.tar.gz
웹페이지 경로로 이동
# mv ossec-wui-0.3 /var/www/html/ossec-wui
셋업파일 실행
# cd /var/www/html/ossec-wui
# ./setup.sh
그룹지정-아파지유저 추가
# vi /etc/group
..
From:
ossec:x:1002:
To (if your web server user is www):
ossec:x:1002:apache
인시폴더 권한설정
# chmod 770 tmp/
# chgrp www tmp/
# apachectl restart
php.ini 변경 설정값
max_execution_time = 180
max_input_time = 180
memory_limit = 30M
*** ossec.conf 파일을 dir 경로를 ossec 설치경로로 맞춰준다. 본인같은 경우 /usr/local/ossec 에 설치됨 ***
마지막으로 웹에서 확인하면 됨.
http://localhost/ossec-wui
yum update
yum groupinstall virtualization
vim /boor/grub/menu.lst
default=0
reboot
현재 가상 리스트 확인
xm list
네트워크 설치 파일 다운
wget http://os.hallym.ac.kr/xen/installer-image/initrd-centos-install.img
이미지 파일 디렉토리 생성
mkdir /xen
디스크 파일생성
dd if=/dev/zero of=/xen/CentOS5.img bs=1024k seek=20480 count=1
설정 및 설치
virt-install -n CentOS_5.4 --prompt consol
-n : 가상 OS 이름
-v : 전 가상화 (Full virtualization)
-p : 반 가상화 (Para virtualization)
--prompt consol : 콘솔 기반으로 설치
How much RAM should be allocated (in megabytes)? 1024
-> 가상 OS에 메모리 용량을 얼마나 줄것인지.. 기본 MB(메가바이트) 단위
What would you like to use as the disk (file path)? /vm/CentOS_5.4.img
-> 가상 OS의 이미지 파일이 저장될 경로
What is the install URL? http://centos.mirror.cdnetworks.com/5.4/os/i386
-> 미러링 서버로 설치 하기 위한
확인
xm list
웹 서버 보안
아파치 method 보안
HEAD / GET / POST / OPTIONS method들이 있음
메소드 제한하는 방법
1. Rewrite module 이용방법
2. Limitexcept 지시자 이용방법
3. mod_security 웹방화벽 이용방법
예문
<Directory />
<LimitExcept GET POST>
Order allow,deny
deny from all
</LimitExcept>
</Directory>
--------------------------------------------------------------------
아파치 access로그에서 메소드 얼마나 나오는지 횟수 검색
=> cat access_log* | awk '{print $6}'| sort | uniq -c | sort -rn
보통은 cat /var/log/httpd/access_log | awk '{print $6}'| sort | uniq -c | sort -rn
--------------------------------------------------------------------
httpd.conf 보안설정
ServerTokens prod
expose_php=Off (php.ini)
http://monkey.org/~pilot/arirang/
arurang -s 아이피 -e 아이피
--------------------------------------------------------------------
<IfModule mod_userdir.c>
UserDir disabled
UserDir enabled 유저명,유저명
</IfModule>
http://아이피/~유저명/
형식으로 접속하는 것을 거절하고 특정유저만 허용하는 설정
--------------------------------------------------------------------
최근 덧글