보안 관리

hahic·2023년 3월 6일
0

RHCSA

목록 보기
8/10
post-thumbnail

SSH에 대한 키 기반 인증 구성

# ------ 파일 /etc/ssh/sshd_config 변경 내용 ------
# #Port 22 -> Port 22
# #AddressFamily any -> AddressFamily inet or inet6
# #ListenAddress XX.XX.XX.X -> ListenAddress XX.XX.XX.X
# PermitRootLogin yes -> PermitRootLogin no
# PasswordAuthentication yes -> PasswordAuthentication no
# X11Forwarding ?

$ sudo vi /etc/ssh/sshd_config
$ sudo systemctl reload sshd.service


# ---------- 파일 .ssh/config 변경 내용 ----------
# Host centos
#	HostName <ip-address>
#	Port <port>
#	User <user-name>

$ vi .ssh/config
$ chmod 600 .ssh/config
$ ssh centos

$ ssh-keygen
$ ssh-copy-id <user-name>@<ip-address>
$ cat ~/.ssh/id_rsa.pub
$ vi authorized_keys
$ chmod 600 authorized_keys
$ ssh-keygen -R <ip-address>

squid

: 리눅스 시스템에서 프록시 서버를 운영할 때 사용되는 자유-오픈소스 소프트웨어

구성 파일 위치

  • /etc/squid/squid.conf

SELinux

  • 보안을 강화하기 위해 리눅스 커널에 추가된 Mandatory Access Control(MAC) 보안 기술
  • 파일 소유자나 그룹 소유자 외에도, SELinux가 정의한 보안 레이블에 따라 접근 권한을 관리할 수 있음

troubleshooting

  • journalctl -xe
  • semanage fcontext -a -t httpd_sys_content_t "/kodekloud(/.*)?"
  • restorecon -R /kodekloud

명령어

  • ls -l
  • ls -Z
  • ps axZ
  • id -Z
  • getenforce
  • sudo setenforce 0
  • sudo semanage login -l
  • sudo chcon -t <type> <file>

Kernel Runtime Parameters

구성 파일 위치

  • /etc/sysctl.conf

명령어

  • sysctl -a
  • sudo sysctl -w <key>=<value>
  • sudo sysctl -p <file-path>
  • sudo sysctl <key>
  • sudo sysctl -p
profile
👩‍💻 Junior Backend Developer

0개의 댓글