centos6 에서 ipaccttable 설치하기 Centos5 버젼에서 ipaccttable 는 이전 게시물에 찾아볼수 있다. (설치방법은 동일하다) http://kensei.co.kr/43 SNMPWALK 명령어로 재대로 동작하는지 확인하기 snmpwalk -v2c -c 커뮤니티값 localhost 1.3.6.1.4.1.14274 Centos6에서는 snmpwalk 명령어로 확인해보면 아무런 반응이 없거나 No response ~ 머라고 나오면서 SNMP 데몬이 죽는 현상이 일어난다 시스템 로그 확인 cat /var/log/messages Dec 2 23:56:32 localhost kernel: snmpd[5998]: segfault at 30 ip 00007f328c821458 sp 00007ff..
geoip 국가 코드 country code 사용예 iptables -A INPUT -m geoip --src-cc CN,US,HK -j DROP iptables -A INPUT -m geoip --src-cc CN,US,HK,AT,AR,AS,AZ,BA,BD,BE,BJ,BM,BQ,BR,BY 국가 코드는 한 라인에 최대 15개 국가코드까지 명시가능하다. 국가코드A1,"Anonymous Proxy" A2,"Satellite Provider" O1,"Other Country" AD,"Andorra" AE,"United Arab Emirates" AF,"Afghanistan" AG,"Antigua and Barbuda" AI,"Anguilla" AL,"Albania" AM,"Armenia" AO,"Angola"..
Centos6.6 (2.6.32-504.16.2.el6.x86_64) + geoip + ipset 설치 사전 패키지 설치 yum install gcc gcc-c++ make automake unzip zip xz kernel-devel-`uname -r` iptables-devel openssh-clients perl-CPAN irqbalance ntsysv vim pci* ncurses* ipvsadm bridge-utils wget libmnl* Text-CSV_XS 설치 rpm -i http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm yum install perl-Text-CSV_XS 업데이트후 리부팅 yum..
syslog (/var/log/messages) Jun 24 18:56:35 localhost kernel: possible SYN flooding on port 80. Sending cookies. 좀 심한 경우라면 아래와 같이 로그가 남을수가 있다.... possible SYN flooding on port 80. Sending cookies. TCP: too many of orphaned sockets Out of socket memory 백로그큐 확인 (1024) 적당... [root@localhost ~]# sysctl -a | grep syn_back net.ipv4.tcp\_max_syn_backlog = 1024 SYN 공격시 초당 몇만개의 스푸핑아이피들이 들어오므로 해결방법은 되지 못한다..
non-threaded servers Prefork 방식 httpd-2.2.13/server/mpm/prefork/prefork.c 파일을 오픈해보면 디폴트가 256개의 자식 프로세스를 생성할수 있으며 200000 까지 최대값을 지정할수 있다고 나온듯 하다. define DEFAULT_SERVER_LIMIT 256 #define MAX_SERVER_LIMIT 200000 #define HARD_THREAD_LIMIT 1 Apache의 최대 접속자를 끌어올릴려면 아래와 같이 셋팅해보자 (Prefork) - ServerLimit 값을 MaxClient 값보다 크게 설정하면 되지 않음 - 너무 값을 올릴경우 서버의 자원보다 더 많은 접속자가 몰릴경우 서버 다운 가능성 - 설정후 Apache restart 말고..
Apache Include conf/extra/httpd-vhosts.conf - /usr/local/apache/conf/extra/http-vhost.conf 에 있는 파일을 사용할려면 주석해제 AllowOverride All Options +ExecCGI Order allow,deny Allow from all - /home 디렉토리에 홈페이지 RootDocument 가 있을때 삽입 443포트 접근안될시 vi /usr/local/apache/conf/ssl.conf - VIRTUALHOST 설정하는 부분에 아이피 대신 * or 443 넣어준다 443포트 접근안될시2 serveralias kensei.co.kr:443 ← 443을 적어주게 되면 이미 위에 443이 명시가 되어 있는데 또 명시가 되어 ..
httpd.conf 버전에 따라 옵션이라든지 디렉토리 구조가 좀 틀린듯 하다. 인덱스 보여주지 않기 Options -Indexes In .htaccess file: Options -Indexes ServerTokens OS - 클라이언트 요청에 되돌려주는 정보에 웹서버의 OS에 대한 정보를 클라이언트에게 보여줌 - ServerTokens Prod : 정보보여주지 않는다?? ServerTokens min - 클라이언트 요청에 최소한의 정보만을 클라이언트에게 보여줌 ServerRoot "/usr/local/apache" - 웹서버의 본체가 있는 디렉토리 소스설치하거나 rpm 으로 설치한 경우 경로가 틀려질수도 ㅋㅋ PidFile run/httpd.pid - 웹 프로세스의 PID를 기록할 파일의 위치를 설정 ..
tar [옵션] [생성백업파일이름] [압축할디렉토리/파일] [옵션] 로컬 백업의 예시 아래와 같이 작성하면 될듯 하다 today=`date +%Y-%m-%d_%H%M` mkdir -p /home/backup/$today tar zcpf /home/backup/$today/dns_var-`date +%Y-%m%d%H%M`.tar.gz /var/named/chroot/var/named; tar zcpf /home/backup/$today/dns_etc-`date +%Y-%m%d%H%M`.tar.gz /var/named/chroot/etc; tar zcpf /home/backup/$today/etc-`date +%Y-%m%d%H%M`.tar.gz /etc;특정디렉토리 제외하고 백업하기 tar cvfz home..
커스터마이징을 해보자... vim /etc/sysctl.conf fs.file-max = 65535 일시적인 방법 ulimit -n 65535 리부팅 해야 함 밑에껀vi /etc/security/limits.conf nginx soft nofile 10000 nginx hard nofile 30000 vi /usr/local/nginx/conf/nginx.conf # set open fd limit to 30000 worker_rlimit_nofile 30000; # nginx -t 2010/11/01 17:07:46 [info] 9520#0: the configuration file /etc/nginx/nginx.conf syntax is ok 2010/11/01 17:07:46 [info] 9520#..
- Total
- Today
- Yesterday
- ssh
- centos8
- Apache
- mariadb
- HAProxy
- softether
- pptp
- ntp
- gitlab
- SSL
- glusterfs
- NGINX
- 리눅스
- WAF
- 베이어다이나믹
- IPSEC
- GeoIP
- L2TP
- iptables
- 인증서
- kvm
- galera
- MySQL
- centOS7
- yum
- OpenVPN
- cURL
- mod_security
- php
- virtualbox
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |