awstats는 perl로 작성된 CGI이다. 따라서 apache에서 perl을 실핼할 수 있어야 한다. 그런데 apache v2.4.x에서는 cgi-script로서 perl을 지원하지 못하는 것 같다. mod_perl 모듈을 추가해서 구성하려고해서 apache v2.4.x를 지원하는 mod_perl을 현재(2013.11.06)까지 나오지 않은 것 같다. 따라서 awstats를 사용하고자 한다면 apache v2.2.x 를 사용해야 한다. cronolog나 retatelogs를 통해서 apache 로그를 순환하더라도 awstats에서 httpd.conf 파일을 확인해서 해당 도메인별로 apache 로그를 찾아 통계를 생성한다. cronolog 는 이전에 작성한 내용을 참고한다. 우선 httpd.conf ..
httpd.conf를 확인해보자. .... # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common # You need to enable mod_logio.c to use %I and %O LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combined..
Port 22 ssh 서버에서 사용할 Listen Port Protocol 2 ssh 서버에서 사용할 openssh 버전, 되도록 버전 2를 사용하도록... LogLevel INFO 로그 레벨을 지정 SyslogFacility AUTH syslog facility 설정 strictModes yes 사용자 홈 디렉터리의 퍼미션 체크 PasswordAuthentication yes 패스워드 인증 사용 AllowUsers root test1 test@1.1.1.1 ssh 접속을 허용할 사용자을 설정, 호스트IP를 같이 입력하면 해당 호스트에서만 계정 접속 가능 DenyUsers test3 test4 ssh 접근을 차단할 사용자 PermitRootLogin no 보안상 no로 설정해 놓는게 좋다. 최조 접근을 ..
1. rename 사용하기 $ rename arg1 arg2 arg3 -arg1 : 바꾸고자하는 문자 -arg2 : 바꾸고자하는 문자를 대체하는 문자 -arg3 : 대상 파일 ex) rename before after berofe* before로 시작하는 파일 이름을 after로 시작하는 파일 이름로 바꾸어 줌 2. find, sed 사용하기 $ find /var -name "*.before*" | sed -e 'p' -e 's/.before/.after/g' | xargs -n 2 mv '/var' 디렉터리에서 'before'라는 문자가 포함된 파일을 찾아 이름을 'after'로 변경해서 파일을 저장해 준다. 기존 파일을 유지할려면 'mv'를 'cp'로 하면 된다. sed에서 첫번째 편집 구문'p'는 ..
1. 우선 Gnome을 설치한다. $ sudo apt-get install gnome-core 2. VNC 서버를 설치한다. $ sudo apt-get install vnc4server 3. VNC 서버 정상 구동여부 확인 및 연관된 스크립트 파일 생성을 위해 VNC 서버를 구동한다. $vncserver 4. 확인 후 VNC 서버를 내린다. $vncserver -kill :1 5. VNC 설정 파일을 수정한다. $ cd ~ $ vi .vnc/xstartup #!/bin/sh # Uncomment the following two lines for normal desktop: unset SESSION_MANAGER -->주석 제거 #exec /etc/X11/xinit/xinitrc gnome-session ..
Mysql은 기본적으로 바이너리 로그를 남긴다.해당 파일은 복구시에도 사용할 수 있다. my.cnf에 보면log-bin=mysql-bin을 주석처리 하지 않는다면 로그를 지속적으로 쌓을 것이다. 기본적으로 data 디렉터리에 쌓이는 것 같다. 필요치 않다면 해당 부분을 주석처리하면 된다. 복구할 때는 mysqlbinlog msyql-bin.000001 > bakcup.sql 형식으로해서 쿼리문으로 복구가 가능하다. 로그를 관리할려면 my.cnf에 아래와 같이 설정하면 된다. binlog_cache_size = 50M # binlog cache 사이즈 max_binlog_size = 500M # bin로그 maximum 사이즈 expire_logs_days = 3 # 로그 만료기간 바이너리 로그 리스트는 ..
SPINE: Poller[0] FATAL: Connection Failed, Error:'1040', Message:'Too many connections' (Spine thread) 위와 같은 에러가 발생하는 것은 mysql 동시 접속수가 제한되어 있어서 그런 것 같다. mysql에서 max_connectin을 늘려주면 되는 것 같다. 현재 mysql max_connection을 확인해보자. # mysqladmin -u root -p variables | grep max_connection mysql 설정파일에서 max_connection을 조절해보자. # vi /etc/my.cnf [mysqld] max_connections=500 mysql을 재구동 참고로 리눅스에서 max_connections 을..
인터페이스 설정 # sudo vi /etc/network/interface auto eth0 iface eth0 inet static address 192.168.0.2 netmask 255.255.255.0 gateway 192.168.0.1 dns-nameservers 168.126.63.1 위에서 dns 설정을 해주었는데도 dns 응답이 없다면 아래와 같이 설정 # sudo vi /etc/resolv.conf nameserver 168.126.63.1 소프트웨어 패키지 리스트 업데이트 및 패키지 업그레이드 # sudo apt-get update && apt-get upgrade 원격 연결을 위해 SSH 서버 설치 ssh 서버 패키지 설치 여부 확인 # dpkg -l | grep ssh ssh 서버 ..
우분투는 한개의 파일에서 인터페이스 설정이 가능하다. 기존에 GUI에서 인터페이스 설정을 했다면 해당 파일을 삭제해주면 된다. /etc/NetworkManager/system-connection 밑에 보면 인터페이스별로 설정파일이 존재한다. 해당 파일을 삭제한 후 아래 설정을 하면 된다. Ubuntu Desktop relies on Network Manager to set up interfaces properly. From the list of files in the package we can found that it has its own configuration file /etc/NetworkManager/NetworkManager.conf. From NetworkManager.conf(5) manua..
- Total
- Today
- Yesterday
- text2pcap
- mergecap
- dvwa
- filesystem check
- MySQL csv
- tshark
- webhack
- docker
- ssl decrypt
- ${1##*.}
- 도커
- 리눅스 버전
- oracle 11gr2
- cisco ssh
- dvwa_bruteforce
- NX ASLR
- history timestamp
- megacli
- bash modification
- excel_aton
- metasploitable3
- recovery file on linux
- capinfos
- dvwa_command
- tcpdstat
- 윈도우 패스워드 복구
- editcap
- pcapng
- docker_dvwa
- bash parameter
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |