반응형 분류 전체보기376 원격호스트에서 ssh 세션을 이용한 rsync 명령으로 파일/디렉토리 복사 원격호스트에서 ssh 세션을 이용한 rsync 명령으로 파일/디렉토리 복사 예) rsync -r -v -u -z --delete -e "ssh -p 22" ~/my_dir john@my_server.net:/home/john/my_backup 예) [root@localhost test]# rsync -v -u -a --delete --rsh=ssh --stats root@172.28.71.45:/home/student1 . root@172.28.71.45's password: receiving file list ... done student1/ student1/.bash_logout student1/.bash_profile student1/.bashrc student1/test.txt student1/... 2018. 1. 14. 클램(ClamAV) 안티바이러스 설치하기 (CentOS 6.6) CentOS 6.6에서 클램 안티바이러스를 설치하는 방법에대해 정리한글입니다. 클램 안티바이러스는 오픈소스로 리눅스 및 윈도우에서 포괄적으로 설치가 가능하며 바이러스의 검사가 가능하나 감염된 파일을 치료해주지는 않습니다. 사용시 이점에 유의해야합니다. 주의 : 이 글을 참고후 설치하여 발생하는 문제점은 작성자가 책임을 지지않습니다. 사용 서버 : 가상서버 CentOS 6.6 64 bit 서버 상태 : 초기 셋팅 상태 # yum install epel-release epel-release의 설치가 완료되었다면 클램 안티바이러스를 설치합니다. # yum install clamav clamscan -r 디렉토리명을 이용해 사용하면 검사가 진행되지만 이런 메세지가 나올수도 있습니다. 안의 내용을 구글 번역등으로.. 2018. 1. 14. 루트킷(rootkits) 체크하기 (chkrootkit, rkhunter) 루트킷(rootkits) 체크하기 (chkrootkit, rkhunter) 대부분의 rootkits은 커널에 의해 숨겨져 커널 내에서만 보인다. chkrootkit과 rkhunter를 사용해 rootkits을 찾아낼 수 있다. Chkrootkit 사용 # yum install chkrootkit # chkrootkit ROOTDIR is `/' Checking `amd'... not found Checking `basename'... not infected Checking `biff'... not found Checking `chfn'... not infected Checking `chsh'... not infected Checking `cron'... not infected ... rkhunter 사용.. 2018. 1. 14. Superblock 손상을 입었을 경우 복구 방법 http://docs.sun.com/app/docs/doc/805-7228/6j6q7uf0i?a=view When the superblock of a file system becomes damaged, you must restore it. fsck tells you when a superblock is bad. Fortunately, redundant copies of the superblock are stored within a file system. You can use fsck -o b to replace the superblock with one of the copies. How to Restore a Bad Superblock 1. Become superuser. 2. Change to a di.. 2018. 1. 14. Fail2ban을 이용한 Brute Force 공격 막기 Fail2ban을 이용한 Brute Force 공격 막기 1. yum으로 패키지 설치 yum install fail2ban 2. 설정 파일 구성 vi /etc/fail2ban/jail.conf ----------//--------- [DEFAULT] # "ignoreip" can be an IP address, a CIDR mask or a DNS host. Fail2ban will not # ban a host which matches an address in this list. Several addresses can be # defined using space separator. ignoreip = 127.0.0.1 2018. 1. 14. awk 명령어 awk 명령어 awk '/west/' datafile : west 라는 글이 있는 줄 출력 awk '/^north/' datafile : north로 시작하는 줄 출력 awk '/^(no | so)/' datafile : no 또는 so 로 시작하는 줄 출력 awk '{ print $3, $2 }' datafile : datafile 리스트의 세 번째 와 두 번째 필드를 스페이스로 띄어서 출력 awk '{ print $3 $2 }' datafile : datafile 리스트의 세 번째 와 두 번째 필드를 그냥 붙여서 출력 awk '{ print "Number of fields : " NF} ' datafile : datafile의 각 줄마다의 필드수를 리턴한다. awk '$5 ~ /\.[7-9]+/' d.. 2018. 1. 14. 리눅스 시스템 모니터링 툴 20가지 리눅스 시스템 모니터링 툴 20가지 from: http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html Need to monitor Linux server performance? Try these built-in command and a few add-on tools. Most Linux distributions are equipped with tons of monitoring. These tools provide metrics which can be used to get information about system activities. You can use these tools to find the possible causes of a perform.. 2018. 1. 14. 쉘 스크립트 (Shell Script) 쉘 스크립트 (Shell Script) - (Ⅰ) 어떤 것이 쉘 스크립트? 우리는 알게 모르게 많은 쉘 스크립트을 사용한다. 그렇다면 어떤 것이 쉘스크립트인가? 확인을 해보는 방법은 file와 grep명령을 사용해서 찾아보는 것이다. 필자의 시스템에서의 결과는 다음과 같다. $ (cd /bin ; file * |grep “shell script”) false : Bourne shell script text igawk : Bourne shell script text remadmin : Bourne shell script text true : Bourne shell script text $ (cd /usr/bin ; file * |grep “shell script”) anytopnm : Bourne shel.. 2018. 1. 14. 리눅스 보안 점검 체크 리스트 리눅스 보안 점검 체크 리스트 1. SUID 점검하기.(root 소유의 SetUID및 SetGID 파일들 점검 #find / -user root -perm -4000 -print (SetUID) #find / -user root -perm -2000 -print (SetGID) #find / -user root -perm -4000 -print -xdev 2. 파티션별 디스크사용량 점검 #df -h 3. 파일무결성 점검. - tripwire 설치 수 실행 4. 백도어 설치여부 점검.(/dev 체크 및 rootkit 점검) #find /dev -type f -exec ls -l {} \; #./chkrootkit 5. 현재 열려진 포트 및 응답가능한 포트 점검. #netstat -atp | grep LIS.. 2018. 1. 14. 국제도메인 삭제일 국제도메인 삭제일 아래의 도메인에 대한 설명은 COM/NET 에 해당됩니다.www.internic.net 에서 아래 두가지의 상태를 조회 하실 수 있습니다. 1. RedemptionPeriod (복구서비스 기간) 인 경우Domain Name: testdomain.COMRegistrar: HANGANG SYSTEMS, INC. D/B/A DOREGI.COMWhois Server: whois.doregi.comReferral URL: http://www.doregi.comName Server: NS1.DOREGI.COMName Server: NS2.DOREGI.COMStatus: redemptionPeriodUpdated Date: 09-jan-2016Creation Date: 08-dec-2014Expir.. 2017. 12. 28. 아파치 서버 끊김없이 재시작 (graceful) - 무중단 재시작 아파치 서버 끊김없이 재시작 * restart 대신 graceful 사용 * 서비스 무중단 재시작 : apachectl -k graceful * 서비스 중지 재시작 : apachectl restart graceful 은 conf 파일을 읽어서 다시 시작하기 때문에 연결이 종료되지 않는다. restart의 경우는 서버를 멈췄다가 재시작하기때문에 연결이 종료되어 버린다. 하지만, 모듈을 추가하는 등의 작업시에는 반드시 restart를 해줘야 한다. * httpd 를 사용해서 restart를 하는 경우 -k 옵션을 제외한다. $ /etc/init.d/httpd graceful 이렇게만 명령을 내리면 된다. ^^* 참고, http://httpd.apache.org/docs/2.0/ko/stopping.html 2017. 11. 23. ModSecurity® Reference Manual 목차ModSecurity® 참조 설명서v2.5.13 현재 v2.6 v2.7 v2.8 v2.9 v3.0 (rc)저작권 © 2004-2017 [https://www.trustwave.com/ Trustwave Holdings, Inc.]목차소개실시간 모니터링 및 공격 탐지공격 방지 및 가상 패치유연한 규칙 엔진임베디드 모드 배포네트워크 기반 배포이식성라이센스OWASP ModSecurity 핵심 규칙 집합 (CRS) 프로젝트개요핵심 규칙 내용아파치 설치선결 요건ModSecurity 2.x는 Apache 2.0.x 이상에서만 작동합니다.mod_uniqueidlibapr과 libapr-utillibpcrelibxml2liblua v5.1.xlibcurl v7.15.1 이상설치 방법GitHub 액세스안정적인 릴리스.. 2017. 10. 12. 이전 1 ··· 23 24 25 26 27 28 29 ··· 32 다음 반응형