linux poison RSS
linux poison Email

How to Add a Custom New Service under xinetd

xinetd, the eXtended InterNET Daemon, is an open-source super-server daemon which runs on many Unix-like systems and manages Internet-based connectivity. It offers a more secure extension to or version of inetd, the Internet daemon.

xinetd features access control mechanisms such as TCP Wrapper ACLs, extensive logging capabilities, and the ability to make services available based on time. It can place limits on the number of servers that the system can start, and has deployable defence mechanisms to protect against port scanners, among other things.

Create a new configuration file in /etc/xinetd.d with at least the following information:

service SERVICE_NAME                         # Name from /etc/services;
{
        server = /PATH/TO/SERVER             # The service executable
        server_args = ANY_ARGS_HERE    # Any arguments; omit if none
        user = USER                                        # Run the service as this user
        socket_type = TYPE                           # stream, dgram, raw, or seqpacket
        wait = YES/NO                                    # yes = single-threaded, no = multithreaded
}

Name the file SERVICE_NAME. Then restart  xinetd to read your new service file.

On starting again, xinetd reads all files in /etc/xinetd.d only if /etc/xinetd.conf tells it to, via this line:
includedir /etc/xinetd.d
Check your /etc/xinetd.conf to confirm the location of its includedir.


0 comments:

Post a Comment

Related Posts with Thumbnails