# [SOLVED]xinetd dies when accessed from !localhost

## Klavs

Hi guys,

I have a service on xinetd (actually I've tried several - they all die) and when I access it via localhost - it works fine. If I access it, on the same host, via the public IP - it throws me off immediately like this:

# telnet x.x.x.x 25555

Trying x.x.x.x...

Connected to x.x.x.x.

Escape character is '^]'.

Connection closed by foreign host.

but xinetd run with -d mode says nothing, except:

05/6/29@18:41:33: DEBUG: 9137 {main_loop} select returned 1

05/6/29@18:41:33: DEBUG: 9137 {server_start} Starting service nm-execute

05/6/29@18:41:33: DEBUG: 9137 {main_loop} active_services = 1

05/6/29@18:41:33: DEBUG: 9137 {main_loop} select returned 1

05/6/29@18:41:33: DEBUG: 9137 {check_pipe} Got signal 17 (Child exited)

05/6/29@18:41:33: DEBUG: 9137 {child_exit} waitpid returned = 9139

05/6/29@18:41:33: DEBUG: 9137 {server_end} nm-execute server 9139 exited

when I do it via localhost it says:

05/6/29@18:42:42: DEBUG: 9137 {main_loop} select returned 1

05/6/29@18:42:42: DEBUG: 9137 {server_start} Starting service nm-execute

05/6/29@18:42:42: DEBUG: 9137 {main_loop} active_services = 1

05/6/29@18:42:42: DEBUG: 9145 {exec_server} duping 7

and then the select returned 1 etc., when I exit - so it seems as if the nm-execute service is exiting on it's own, except  I tried putting a print line in the first line of the script (it's perl) - and it prints just fine, when accessed via localhost, but it never gets that far, when going to the public IP.

Anyone have any idea as to what is wrong with xinetd? 

This script works perfectly on an older Red Hat box with inetd.

the service is configured this way:

# default: on

service nm-execute

{

        flags           = REUSE

        socket_type     = stream

        wait            = no

        user            = root

        server          = /usr/bin/execute.pl

}

(and no it does not execute anything without valid user/pass  :Smile: 

Any ideas what i could look at next?

I've compiled xinetd with these flags:

-march=pentium3 -O3 -pipe

but perhaps something before that, has been compiled with other flags - I'm unsure.. but everything else just works.

----------

## Klavs

Arghh - typical:

/etc/xinetd.conf:

defaults

{

       only_from      = localhost

...

and when nothing's stated in the service, it adapts that  :Sad: 

Fixed, by commenting it out.

----------

## bastibasti

Thanks. Made my day

----------

