xinetd

转载 2004年10月30日 22:56:00
来自  http://www.xinetd.org/

xinetd


xinetd is a secure replacement for inetd. It was originally written by panos@cs.colorado.edu. This is a home for xinetd, and a place for information to be gathered, bugs to be submitted, and hopefully fixed.
Information:
Features of xinetd
xinetd FAQ
Changelog
Sample config
Recent changes
CVS Web
Download:
Source to xinetd 2.3.13 (Released 1 Feb. 2004).
Old distributions of xinetd


Frederic Raynal has written an excellent article on xinetd.

Curator has written a tutorial on the use of xinetd here.

xinetd has a mailing list. More information on xinetd mailing lists can be found here.

The xinetd cvs repository can be accessed in the following way:
cvs -d :pserver:anonymous@cvs.xinetd.org:/cvs/xinetd login
Hit enter when asked for a password. (there is no password) You can then check out xinetd with the following command:
cvs -d :pserver:anonymous@cvs.xinetd.org:/cvs/xinetd co xinetd


Features:
Access control: Has builtin access control for stopping connections from evil bad guys, or for only allowing connections from good guys. Can be compiled with builtin libwrap support. Use hosts.{allow|deny}! More efficient than using tcpd! Tcp wrappers are good, but can only see one connection at a time. xinetd can limit the rate of incoming connections, number of incoming connections from specific hosts, or total number of connections for a service. Limit access to services based on access time of day. You can have specific services bind to specific IP's. This lets you provide different services to internal clients than external clients. Prevent denial of service attacks! With the access control capabilities of limiting the rate of incoming connections, xinetd can respond to "port bombs" in a reasonable fashion. If one host seems to be hogging your services, you can limit the number of simultaneous connections from a host. You can place limits on the size of the log files it creates, so people can't fill your disk. Extensive logging abilities! You can configure the syslog logging level for each service independently. If you don't want to use syslog logging, you can have each service log to a file, independent of any other service. It can log the start and stop times for the connection, so you can determine how long a client used your services. It can log extensive information about failed connection attempts. Offload services to a remote host The redir feature allows you to redirect a TCP stream to another host. This other host does not need to be an externally reachable machine. If you want to provide services on a NAT'd machine, run xinetd with the redir feature to redirect the service to a different host. IPv6 support As of the xinetd 2.1.8.8pre* series, xinetd supports IPv6. User interaction You can print different banners to the client when they have a successful connection, when their connection attempt failed, and always regardless of connection status. This can help keep your users informed of changes, and why they may be having trouble accessing services.

2.3.13 Add NULL entry to success_log_options to properly end the nvlist. -Steve Grubb Portability updates to libportable.h. -Matthias Andree Occasionally Smorefds didn't allocate more fds as expected. -Jay Fenlason Address list parsing considered the comma in factorized addresses to be an error. Updated test to allow factorized address. -Steve Grubb When parsing inet.conf, the filename wasn't being set for subsequent messages. -Steve Grubb Fix addrlist_match to correctly handle IPv4 mapped IPv6 addresses. -Christof Meerwald Fixed a bug where reloading configuration would core dump if file logging was enabled in defaults and a connection existed when SIGHUP was received. -Steve Grubb If too many connections hit and exhausts the file descriptors such that accept fails, deactivate the service like the cps access control does. This problem was reported by David Cook. -Steve Grubb Updated rpm.spec file and added default config files to contrib directory. -Steve Grubb Allow group & user to be specified by numeric value. -Steve Grubb

2.3.12
Cleanup some signal handling if not defined. -MARUYAMA Shinichi Make ident protocol work properly for multi-homed hosts. -Alan Sundell Code cleanup for const warnings. -Steve Grubb Make redirect protocol independent. -Cougar Make reconfig iterate over all services. Some may be in "not started" state and were being missed. -Steve Grubb Make redirected, forking builtins, & tcpmux close all listening descriptors so reconfig works. -Jay Fenlason Add support for the IPV6_V6ONLY socket option. Don't assume a default setting, as the default seems to be in flux. Address compare in readjust was wrong. Its now corrected to handle each address family separately. -Steve Grubb Add command line option to not fork. This will allow xinetd to be started by init or daemontools. -Matthias Andree Fixed a leak in reconfig. If log_type = file is used for a service and SIGHUP is sent to xinetd, it leaked a file descriptor and 44 bytes of memory per service using FILE. -Steve Grubb Change all close() calls to Sclose() to prevent future problems. -Steve Grubb Fixed bug if service name is unparsable and in an included directory that caused xinetd to core dump. -Steve Grubb Fixed bug where address lists had "version" uninitialized when the list used hostnames with no dots in the name. -Steve Grubb Numerous memory leaks when parsing errors occurred. -Steve Grubb Remove the servers and xadmin internal services. Update addrlist_match to use the address part of the IPv6 address structure. -Christof Meerwald Correct looping problems for udp connections rejected by the child access controls. -Steve Grubb Added TRAFFIC logging option to report total bytes in and out for a redirected service. -Christof Meerwald Correct a double-free condition if a retry was scheduled. -Steve Grubb Add filename to parse messages. -Steve Grubb Improve port error messages after parsing. -Steve Grubb Sclose dump_fd if SIO error causes dump abort. -Steve Grubb Smorefds wasn't allocating the proper amount of sio descriptor space if the fd was > 5 over its last known fd. -Steve Grubb 2.3.11 Fix some compile time errors on Solaris Fixed a bounds check in Sdone(). Patch from Dmitry V. Levin Added FreeBSD loadavg support. Patch from Vanilla I. Shu TCPMUX parser updates. -Steve Grubb TCPMUX was causing core dumps due to changes made in 2.3.10's child_process(), reverted changes. -Philip Armstrong Remove RECORD logging option. -Steve Grubb Change Sclose to make sure it always closes the fd. -Steve Grubb Added better error handling to filelog.c. -Steve Grubb Error messages now go to syslog instead of stderr in strparse.c. -Steve Grubb Fixed memory leaks found with valgrind. -Steve Grubb Correct problems with bind specified in the default section. -Steve Grubb Use Sclose to close banner commands. -Jay Fenlason Correct banner to match man pages. -Jay Fenlason 2.3.10 Close the service descriptors on fork. This only matters for internal forking services, since anything that calls exec() will get those closed automagically. This will help reduce the file discriptors used by the daemon when using some internal services Fix a numbering bug with xinetd's internal flag representation that was manifesting its self as all services being disabled upon recieving a SIGUSR2 (hard reconfig) Don't pass a hostname to dns registration calls, it'll pick a hostname automagically. Remove CLEANUP and other dead code. Make sure tcp internal non-forking services close their filedescriptors. Added syslog facilities for the xinetd log configuration to match SUS. - Steve Grubb Start reporting the Per Source value when dumping debugging output - Steve Grubb Correct the fake-getnameinfo.h to include appropriate macros. - Steve Grubb Up the default CPS value to 50 from 10. Document the default CPS values in the xinetd.conf man page. Fix a closing of the connection when there's an error handling the service. - Steve Grubb Fixed a bug in the includedir path where a reference was kept to free()'d memory. Fixed a bug in the consistency check mechanism where it would report the signal pipe as a problem. Clear memory before freeing it. This isn't strictly necissary, but aids in debugging. Add the pid to debugging messages. Remove access control calls for special services. The access control functions must always allow these services anyway. Fixed a bug with reconfiguring services using the interface attribute. -- Adam Lukosek Fixed a bug with deallocating dns registrations. Fixed a bug where tcp_wrappers would not identify an internal service since the internal service has no executable. -Steve Grubb Sclose was being used on the config file descriptor. Since sio never touches the descriptor, it failed to close it. - Steve Grubb Fix a potential memory leak with bind_addr and service reconfig. - Andrey Alekseyev Fix a reconfig timing issue. - Andrey Alekseyev

2.3.9
Fixed bug uncovered by IPv6 updates for bind parser. In the id_parser, a test was being performed for uniqueness. It relied on the address already being given. However, the address may not be known if more than one record came back from the getaddrinfo function call. -Steve Grubb Added code to service_fill to resolve port if unspecified. -Steve Grubb Consolidated duplicate services tests into check_entry. -Steve Grubb Fixed a bug with access control & internal services. Make sure we byteswap the value returned by time services. Fix an omission with the tcpmux integration. Fixed a race when there's 1 service configured and it is a wait service. 2.3.8 Reworked redirect to better detect problems in its configuration. Also, redirect now allows service names for port numbers. -Steve Grubb Reworked attribute checking in confparse & updated attr.h. -Steve Grubb Ensure that children have the default signal handlers installed. Added support for DNS service registration ala Rendezvous. Fixed some compile errors on Mac OS X, FreeBSD, and OpenBSD. Added preliminary support for tcpmux -Philip Armstrong Update the xinetd man page to document the -version option. Now ignores the --with-inet6 compile option. Services will default to IPv4 unless configured otherwise. Bring back the inetd.conf parser in a different form. Parse all the xinetd config files first, then parse /etc/inetd.conf, and add services from there (if it exists). Use the -inetd_compat option to read inetd.conf. IPv6 updates for bind_parser, only_from, and no_access. -Steve Grubb
2.3.7
Added fixes or workarounds for issues introduced after 2.3.3 including the signal pipe leak into child processes (a security hole). -Solar Designer Made xinetd unlink its pidfile when there turns out to be no services configured on reload. -Solar Designer
2.3.6
Updated only_from to 'and' both the remote address and the specified portion if a network mask type address is used. -Steve Grubb Updated explicit_mask to chose NUMERIC_ADDR if mask is 32. -Steve Grubb Many parser updates. -Steve Grubb Propogate default attributes even if not specified. log_on_success, log_on_failure, passenv were the main items affected by this problem. only_from and no_access now conform to this new propogation technique. -Steve Grubb Xremove now uses domain names in addition to ip addresses. -Steve Grubb Moved sensor code into its own file and changed it to use timer facility. -Steve Grubb Reworked remote_addr check & addrlist_match to not cache IP addresses and corrected several algorithmic problems. -Steve Grubb Off-by-one error corrected in pset_delete. -Steve Grubb Updated attrfill to use IPv4 addresses if bind specified. -Steve Grubb Fixed bug in libwrap code to check server better for NULL -Steve Grubb Added better testing of configuration if NAMEINARGS flag is set. -Steve Grubb Updated config.guess & config.sub. -Thomas Seyrat Added an rpm spec file. -Steve Grubb Removed sio/suite directory. It appears that key files have been deleted in the past so it no longer works. -Steve Grubb Make the file descriptor buffer allocation dynamic. This substantially reduces xinetd's normal memory footprint (~760KB). -Rob Braun Work around bugs in Mac OS X's getrlimit/setrlimit which causes them to be almost unusable. -Rob Braun 2.3.5 Included patch from Trond at RedHat to check signal pipe if there are no services running. Update the access_times parser to disable service if there is a parse error. Also corrected ti_add too. -Steve Grubb Updated all parsers to propogate errors so service will be disabled. -Steve Grubb Updated internal services to check the signal pipe periodically. -Steve Grubb Updated sendsig to wait for termed children so zombies aren't created and ports are clear to rebind to on hard_reconfig. -Steve Grubb Included a patch from Hendrik Visage for a problem with ident.

Bug reports or patches may be sent to me at:
bbraun@synack.net.

xinetd的作用

linux提供服务是由运行在后台的守护程序(daemon)来执行的。守护进程的工作就是打开1个端口(port),等待(listen)进入的连接。在C/S模式中,如果客户提请了1个连接,守护进程就创建(...
  • fwch1982
  • fwch1982
  • 2011年04月18日 23:20
  • 1597

使用xinetd来配置rsync服务器

保证一个机器的文件内容与主服务器内目录的文件内容自动同步 安装(xinetd 与rsync) chkconfig rsync on 与 service xinetd restart 配置文件 rsy...
  • harrison2010
  • harrison2010
  • 2015年08月26日 10:47
  • 2577

linux xinetd 与 telnet

使用操作系统版本:RHEL5 今天想体验下linux 下的telnet服务,本以为linux的telnet服务是默认开启的,所以在windows上的telent客户端直接连过去,竟然连不通~查看一下...
  • wangsifu2009
  • wangsifu2009
  • 2011年09月10日 16:56
  • 3260

CentOS6.5 xinetd启动/重启错误

问题:安装了rsync服务,用rpm包安装的,安装后启动了,修改了rsyncd.conf 后要重启xinetd服务,提示找不多xinetd服务,结果如下: [root@linuxzgf ~]# se...
  • xiangbudao8
  • xiangbudao8
  • 2017年06月19日 17:04
  • 1021

刚刚注意到rhel6里边默认是不装xinetd的。

刚刚注意到rhel6里边默认是不装xinetd的。
  • msdnchina
  • msdnchina
  • 2015年03月08日 16:42
  • 2020

Centos下安装xinetd以及minicom、tftp的配置

在linux下配置arm嵌入式等过错中,遇到了一些问题,在网上也搜索了相关的资料,还是不能解决,传统的方法,比如用yum安装就能解决问题,但是在我的机器上用yum指令是解决不了这个问题,怎么办呢,只能...
  • IDOshi201109
  • IDOshi201109
  • 2013年11月22日 11:32
  • 8310

Linux xinetd 与 vsftpd

vsftpd是一个非常安全的ftp服务程序~ 它可以独立工作,即工作在standalone模式下(在vsftpd.conf中设置listen=no);它也可以在xinetd守护程序下运行,即修改/e...
  • wangsifu2009
  • wangsifu2009
  • 2011年09月11日 11:14
  • 1157

在SUSE上安装build Forge出错, 解决方法:xinetd的启动问题 start restart failed

When I installed bfagent, I met the following problem.rfidic05:/home/tsadmin/hxlin/buildforge/bfagen...
  • linhx
  • linhx
  • 2009年12月29日 11:31
  • 3591

linux 命令系列之 基于xinetd服务(66)

1.安装xinetd和telnet yum -y install xinetd yum -y  install telnet-server chkconfig --list /// 查看 ne...
  • chmod_R_755
  • chmod_R_755
  • 2015年05月17日 22:07
  • 635

分别在xinetd模式和在standalone模式下启动FTP

关于xinetd模式和standalone模式    xinetd模式:由xinetd作为FTP的守护进程,负责21端口的监听,一旦外部发起对21端口的连接,则调用FTP的主程序处理,连接完成后,则...
  • u013501512
  • u013501512
  • 2014年03月06日 17:07
  • 2345
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:xinetd
举报原因:
原因补充:

(最多只允许输入30个字)