https://goyalankit.com/blog/xinetd
XINETD - Extended Internet Daemon
April 16, 2017
I was recently looking into ways to provide ssh access inside linux network namespaces and came across xinetd. So I decided to dig more into it. Noting it down here so that I can refer it back.
XINETD
It’s basically a daemon that listens for network requests and services them by spawning more processes.
The master configuration for xinetd lives in /etc/xinetd.conf. Each service managed by xinetd has a configuration file in /etc/xinetd.d/.
Each network service is listed in /etc/services that xinetd could potentially manage.
Let’s look at an example from one of the services in /etc/xinetd.d/ to see how it works:
An echo service
This was a default service that was present on my RHEL6 box. There were lots of settings in this file which were basically commented out. Most of them are self explanatory, so I have omitted them for brevity.
$ sudo cat /etc/xinetd.d/echo-stream
# This is the configuration for the tcp/stream echo service.
service echo
{
# This is for quick on or off of the service
disable = yes
# The next attributes are mandatory for all services
id = echo-stream
type = INTERNAL
wait = no
socket_type = stream
# protocol = socket type is usually enough
}
echo service simply provides an echo service (duh). But what port does it listen to? The port can be checked in /etc/services file, search for echo in file, and on my machine it had an entry that looked like this:
$ sudo cat /etc/services | grep echo
echo 7/tcp
If you try to connect to this port; the connection will fail since the disabled flag is set to yes in the above configuration file.
$ telnet 172.22.210.126 7
Trying 172.22.210.126...
telnet: connect to address 172.22.210.126: Connection refused
telnet: Unable to connect to remote host
Let’s enable the service by setting disable = no in /etc/xinetd.d/echo-stream. In addition, you’d need to restart the xinetd service.
$ sudo service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
Now again, let’s try to connect to service.
$ telnet 172.22.210.126 7
Trying 172.22.210.126...
Connected to angoyal-ld2.linkedin.biz.
Escape character is '^]'.
hola <---- I said hola to Server.
hola ----> Server said hola back.
^]
telnet> q
Connection closed.
Sweet.
You can use xinetd to run your own network service and have full control. I have some ideas which I’ll document if they work.
So long.
分享到:
相关推荐
xinetd提供类似于inetd+tcp_wrapper的功能,但是更加强大和安全。它能提供以下特色: * 支持对tcp、udp、RPC服务(但是当前对RPC的支持不够稳定) * 基于时间段的访问控制 * 功能完备的log功能,即可以记录...
xinetd-2.3.14-40.el6.x86_64,xinetd即extended internet daemon,xinetd是新一代的网络守护进程服务程序,又叫超级Internet服务器。...xinetd提供类似于inetd+tcp_wrapper的功能,但是更加强大和安全
linux telnet服务守护进程,在命令行下执行 rpm -ivh xinetd*.rpm 进行安装,安装完后,编辑 /etc/xinetd.d/telnet,把disable 的yes 改为no 。执行命令 service xinetd start 即可启动服务,必要时关闭防火墙
xinetd-2.3.14-13.el5.x86_64xinetd-2.3.14-13.el5.x86_64xinetd-2.3.14-13.el5.x86_64xinetd-2.3.14-13.el5.x86_64xinetd-2.3.14-13.el5.x86_64xinetd-2.3.14-13.el5.x86_64xinetd-2.3.14-13.el5.x86_64
Xinetd:即extended internet daemon,是新一代的网络守护进程服务程序,又叫超级Internet服务器,常用来管理多种轻量级Internet服务。
在命令行下执行 rpm -ivh xinetd*.rpm 进行安装,安装完后,编辑 /etc/xinetd.d/telnet,把disable 的yes 改为no 。执行命令 service xinetd start 即可启动服务,必要时关闭防火墙
xinetd rpm文件,用来配合haproxy,通过xinetd提供的http服务mycatstatus来让Haproxy进行Mycat服务检测,即检测Mycat存活状态。Haproxy通过调用该http服务获取Mycat运行状态。
xinetd安装程序,xinetd 取代了inetd,并且提供了访问控制、加强的日志和资源管理功能
简析Suse Linux的xinetd服务.pdf
telnet离线安装包rpm(含xinetd),适用于centOS6版本!
用xinetd简化Linux与Windows的通讯.pdf
xinetd是一个daemon程序,所有结尾带d的程序都是daemon程序,也就是守护程序 守护程序分为2种处理模式: 第一个是stand alone状态的,表示该程序始终监听,一直处于运行状态,例如httpd 第二个是super daemon,它...
xinetd-2.3.15-14.el7.x86_64.rpm
使用本配置方法,可以实现: 平时vnc server进程并不运行,当有客户端连接时会自动开启进程。 使用51024端口可以运行1024*768的分辨率,使用50800可以运行800*600的分辨率。 ... vnc客户端一旦关闭则相应进程会自动...
xinetd即extended internet daemon,xinetd是新一代的网络守护进程服务程序,又叫超级Internet服务器。经常用来管理多种轻量级Internet服务。xinetd提供类似于inetd+tcp_wrapper的功能,但是更加强大和安全。
xinetd - A secure replacement for inetd. Distribution: CentOS 5 Repository: CentOS x86_64 Package name: xinetd Package version: 2.3.14 Package architecture: x86_64 Package type: rpm Installed ...
xinetd已经取代了inetd,并且提供了访问控制、加强的日志和资源管理功能,已经成了Red Hat 7 和 Mandrake 7.2的Internet标准超级守护进程。* 支持对tcp、ucp、RPC服务(但是当前对RPC的支持不够稳定) * 基于时间段...
xinetd是linux下一款超级服务器,许多网络服务如:telnet,ftp等都可以挂在xinetd下面。对linux感兴趣的朋友可以好好研究一下该代码。