Solaris 10버전 이상 tcp_wrappers(hosts.deny, hosts.allow) 설정

ITKHJ·2024년 9월 11일

Server

목록 보기
29/32
post-thumbnail

Solaris 10버전 이상 tcp_wrappers 설정 방법(hosts.deny, hosts.allow

최초 tcp_wrappers 서비스 상태 확인

inetadm -p

NAME=VALUE
bind_addr=""
bind_fail_max=-1
bind_fail_interval=-1
max_con_rate=-1
max_copies=-1
con_rate_offline=-1
failrate_cnt=40
failrate_interval=60
inherit_env=TRUE
tcp_trace=FALSE
tcp_wrappers=FALSE --> Solaris10은 기본적으로 tcp_wrappers가 설치되어 있으나, 서비스는 동작하지 않은 상태다.
connection_backlog=10

tcp 서비스 온라인 상태 확인

#inetadm | grep tcp
enabled online svc:/network/rpc/cde-ttdbserver:tcp

tcp_wrappers 서비스 상태 값 변경

#inetadm -M tcp_wrappers=true ---> tcp_wrappers 활성화
#inetadm -M tcp_wrappers=FALSE ---> tcp_wrappers 비활성화

hosts.allow와 hosts.deny 파일 생성

touch /etc/hosts.allow

touch /etc/hosts.deny

※ 최초에 hosts.allow와 hosts.deny 파일이 생성되지 않기 때문에 생성 해줘야함

tcp_wrappers 설정 파일 생성 및 내용 추가

#cat /etc/hosts.allow --> hosts.allow와 hosts.deny가 같은 내용으로 등록되면 allow가 우선권을 갖는다.
ALL:ALL 로 모두 허용 하거나
sshd:xxx.xxx.xxx.xxx 로 특정 IP허용
sshd:xxx.xxx.xxx. 로 옵션을 줄 경우 특정 대역 허용

vi /etc/hosts.allow
#20240911_hosts.allow 파일 설정
sshd:xxx.xxx.xxx.xxx

vi /etc/hosts.deny
#20240911_hosts.deny 파일 설정
sshd:xxx.xxx.xxx.xxx

#cat /etc/hosts.deny
ALL:ALL

설정 구문
in.telnetd → Telnet Service
sshd → SSH Service
in.ftpd → FTP Service

svc:/network/inetd:default inetd online 상태 확인

svcs -a |grep inet

inetd 변경 사항 적용을 위한 inetd 재기동

svcadm restart inetd

profile
모든 업무 지식 작성하자!

0개의 댓글