No Image

config static port for nfsd on centos6

2016-05-21 KENNETH 0

config static port for nfsd on centos6   출처 : https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/s2-nfs-nfs-firewall-config.html 설정파일 :  /etc/sysconfig/nfs RQUOTAD_PORT=875 LOCKD_TCPPORT=4001 LOCKD_UDPPORT=4001 MOUNTD_PORT=4002 STATD_PORT=4000 #STATDARG=”-p 4000″ STATDARG=”-p 4000” 와 STATD_PORT=4000 옵션은 동일한것임..   실행 후 포트 상태 확인 # rpcinfo -p program vers proto port service 100000 4 tcp 111 portmapper 100000 3 tcp 111 portmapper 100000 2 tcp 111 portmapper 100000 4 udp 111 portmapper 100000 3 udp 111 portmapper 100000 2 udp 111 portmapper 100024 1 udp 4000 status 100024 1 tcp 4000 status 100011 1 udp 875 rquotad 100011 2 udp 875 rquotad 100011 1 tcp 875 rquotad 100011 2 tcp 875 rquotad 100005 1 udp 4002 mountd 100005 1 tcp 4002 mountd 100005 2 udp 4002 mountd 100005 2 tcp 4002 mountd 100005 3 udp 4002 mountd 100005 3 tcp 4002 mountd 100003 2 tcp 2049 nfs 100003 3 tcp 2049 nfs 100003 [ more… ]

No Image

tcp-wrapper on proftpd (using mod_wrap2, mod_wrap2_file)

2016-04-18 KENNETH 0

tcp-wrapper on proftpd (using mod_wrap2, mod_wrap2_file) 개요 proftpd 를 컴파일 해서 사용 중 iptables 말고 tcp-wrapper 를 이용해서 접근제어를 하고 싶음 그러면서 ftp접근을 모두 막되… 내가 열어주고 싶은 아이피 주소에 대해서만 허용을 하고 싶음 centos, ubuntu 등에서 사용가능한(할지도모르는) proftpd 패키지는 테스트를 안함… 갸들은 아마 되겠지… 설마… 컴파일 하는 환경에서 쓸모 있는 정보… 허용하고 싶은 아이피 주소 : 192.168.100.200     설치 require : proftpd-1.3.3 or higher 였던가.. ??;;;; configure –with-shared=mod_wrap2:mod_wrap2_file –enable-wrapper-options 당신이 만약 다른 옵션들을 사용하고 있다 하더라도 컴파일시  ”–with-shared=mod_wrap2:mod_wrap2_file –enable-wrapper-options” 옵션만 들어가 있으면 됨 mod_wrap2, mod_wrap2_file 이라는 모듈이 추가로 필요하기 때문   설정 proftpd 설정 파일명 : proftpd.conf LoadModule mod_wrap2.c LoadModule mod_wrap2_file.c WrapEngine on WrapServiceName proftpd WrapTables file:/etc/hosts.allow file:/etc/hosts.deny   접근제어 설정 우선 차단.. 파일명 : /etc/hosts.deny ALL:ALL 로 쿨하게 막아버리자…   그다음 허용.. 파일명 : /etc/hosts.allow proftpd:192.168.100.200   끝… 그 외에.. 차단메세지 설정등의 옵션도 있으나.. 난 그런건 안좋아함.. [ more… ]

No Image

USE Method: Linux Performance Checklist

2016-04-05 KENNETH 0

출처 : http://www.brendangregg.com/USEmethod/use-linux.html   USE Method: Linux Performance Checklist The USE Method provides a strategy for performing a complete check of system health, identifying common bottlenecks and errors. For each system resource, metrics for utilization, saturation and errors are identified and checked. Any issues discovered are then investigated using further strategies. This is an example USE-based metric list for Linux operating systems (eg, Ubuntu, CentOS, Fedora). This is primarily intended for system administrators of the physical systems, who are using command line tools. Some of these metrics can be found in remote monitoring tools. Physical Resources component type metric CPU utilization system-wide: vmstat 1, ”us” + ”sy” + ”st”; sar -u, sum fields except ”%idle” and ”%iowait”; dstat -c, sum fields except ”idl” and ”wai”; per-cpu: mpstat -P ALL 1, sum fields except ”%idle” and ”%iowait”; sar -P ALL, same as [ more… ]

No Image

keepalive + LVS on centos7

2016-03-31 KENNETH 0

개요   가상아이피 : 192.168.100.210 WEB1(real server) : 192.168.100.201 WEB2(real server) : 192.168.100.202 WEB서버에  keepalive+ipvsadm 패키지를 이용해서 LVS를 병행 구성 LVS구성시 real server 의 유효함을 판단 하는 방식 : URL HASH 체크 서버의 NIC 이름 : enp2s0f0 (서버마다 다를 수 있으므로 확인 할 것)   sysctl   sysctl의 net.ipv4.ip_forward = 1 상태여야함… echo “net.ipv4.ip_forward = 1” >> /etc/sysctl.conf sysctl -p   패키지 설치   yum install keepalived ipvsadm   URL HASH 값 구하기   genhash -s 192.168.100.201 -p 80 –url /lvs/lvs_check.php genhash -s 192.168.100.202 -p 80 –url /lvs/lvs_check.php 실행된 결과 값이 MD5SUM = 384dc7f45228c6ff3ecaa6cc8d15bccb MD5SUM = 384dc7f45228c6ff3ecaa6cc8d15bccb 대략 이렇게 나왔다고 가정하자   마스터 설정   /etc/keepalived/keepalived.conf global_defs { notification_email { } router_id LVS_DEVEL } vrrp_instance VI_1 { state MASTER interface enp2s0f0 virtual_router_id 200 priority 200 advert_int 1 authentication { auth_type PASS auth_pass ilayapass } virtual_ipaddress { 192.168.100.210 } } virtual_server 192.168.100.210 [ more… ]

No Image

/etc/sysconfig/iptables 에 포트 리다이렉션 추가해 주기

2016-03-24 KENNETH 0

지난번에 설명 했던 글에.. 하나를 빼먹어서.. 그냥 정리함.. ㅋㅋㅋ iptables port redirection 이것을 설명하면서 리부팅시에. 또는 iptables 를 재시작 할때.. 어떻게 고정 시키는지도 설명을 해줬으면 좋았겠다.. 하는 생각이 들어서 정리함… 뭐 그닥 중요하진 않음     설정 파일 : /etc/sysconfig/iptables *nat :PREROUTING ACCEPT [0:0] :POSTROUTING ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A PREROUTING -p tcp -m tcp –dport 587 -j REDIRECT –to-ports 25 COMMIT   요렇게 추가로 등록을 해주면 됨…