2019/04/17 6

centos nfs 설정

centos nfs 설정 [root@localhost /]# cat /etc/exports /data 192.168.10.0/24(rw,sync,no_root_squash,fsid=0) /data : nfs목록을 내보낼 디렉터리 192.168.10.0/24 : 접근을 허용할 IP(대역) rw : 읽기/쓰기 설정, 읽기전용으로 설정할때는 ro sync : 데이터의 변경사항이 디스크에 기록되기 전에는 응답하지 않는다는 설정. no_root_squash : root로 마운트할때, nobody로 매핑(기본값)을 해제 fsid=0 : root 사용자로 nfs 마운트 됨(V4에서만 적용.) OS버전별 서비스 실행 및 적용 (Centos 5.x) /etc/init.d/nfs start /etc/init.d/portm..

리눅스/기타 2019.04.17

/bin/su 4750 설정

특정 계정만 su에 접근할수있게끔 설정하는 방법이있다. /bin/su 의 권한을 수정하는것인데 아래와같이 설정하면된다. 1. /bin/su 의 소유권을 바꾼다. 초기에는 /bin/su의 권한이 -rwsr-x--- 1 root root 28336 3월 21 2012 /bin/su* 위와같이 root.root 로되어있다. 이부분을 #chown root:wheel /bin/su 명령어로 아래와같이 바꿔준다. -rwxr-x--- 1 root wheel 28336 3월 21 2012 /bin/su 2.바꾼뒤 접속을 시도하였을시 패스워드는 정확하지만 접속이 안될수있는경우가있다. 이럴경우 /bin/su의 권한을 다시 설정해본다. #chmod 4750 /bin/su 위와같이 수정후 다시 접속해보면 정상접근되는부분 확인..

리눅스/Security 2019.04.17

apache 2.4에 modsecurity-2.9 설치

apache 2.4.12 에 modsecurity 2.9.0설치 download : https://www.modsecurity.org/tarball/2.9.1/modsecurity-2.9.1.tar.gz 수행 명령 : yum install expat expat-devel ./configure --with-apxs=/usr/local/apache/bin/apxs make make install apache 설정파일 변경 vi /usr/local/apache/conf/httpd.conf LoadFile /usr/lib64/libxml2.so LoadFile /usr/lib64/liblua-5.1.so LoadModule security2_module modules/mod_security2.so 위설정을 마친..

리눅스/Security 2019.04.17

centos7 iptables 사용

firewalld 방화벽 중지 [root@localhost ~]# systemctl stop firewalld firewalld 재시작 방지 중지 [root@localhost ~]# systemctl mask firewalld Created symlink from /etc/systemd/system/firewalld.service to /dev/null. iptables 서비스 관련 패키지 설치 [root@localhost ~]# yum install -y iptables-services . . Installed: iptables-services.x86_64 0:1.4.21-17.el7 Complete! 기본 사용 설정 [root@localhost ~]# systemctl enable iptables C..

리눅스/Security 2019.04.17