Post

xinetd / micro-inetd

micro-inetd
1
2
usage:  micro-inetd port program [args...]

xinetd

원래 유닉스 기반 시스템에서 네트워크 서비스를 제공하는 방법으로는 inetd + tcpd 조합과 standalone 방식이 있었다. 요즘은 보안측면의 한계로 inetd 대신 xinetd를 사용한다. xinetd를 사용하면 tcpd로 패킷을 포워딩 해줄 필요 없다. TCP wrapper를 사용 안한다는 의미는 아니고, 별도의 프로그램(tcpd)을 따로 사용할 필요가 없어진 거라고 생각하면 된다.

기본 설정파일은 /etc/xinetd.conf 이고, xinetd가 제공하는 서비스들의 설정은 /etc/xinetd.d/에 각각 존재한다. * 프로세스는 설정 파일에 지정된 user의 권한으로 xinetd 위에서 실행되며 프로세스가 쉘 등의 subprocess를 실행하면 setuid()가 없어도 userruid로 실행된다.

1
2
3
4
5
6
7
8
9
10
11
12
service test\_xinetd
{
disable         = no
socket\_type     = stream
protocol        = tcp
user            = umbum
wait            = no
server          = /home/umbum/test\_xinetd
port            = 3232
}

https://linux.die.net/man/5/xinetd.conf

추가/삭제/수정하고 나서는 꼭 재시작

1
2
service xinetd restart

This post is licensed under CC BY 4.0 by the author.