Linux – Bypass /etc/services lookup for xinetd

linuxxinetd

I'm looking to execute a script launched by xinetd over an arbitrary port. However after some testing it appears that I will need to explicitly define the service and port on /etc/services for xinetd to enable the service.

Is there an option in xinetd wherein I can disable lookup on /etc/services or specify an alternate file to lookup service/ports?

Best Answer

This should work:

service whatever
{
        type            = UNLISTED
        port            = 4444
        (...)
}

The type UNLISTED will disable the lookup in /etc/services or /etc/rpc.