Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]xinetd dies when accessed from !localhost
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Klavs
Guru
Guru


Joined: 22 May 2002
Posts: 536
Location: Denmark

PostPosted: Wed Jun 29, 2005 4:46 pm    Post subject: [SOLVED]xinetd dies when accessed from !localhost Reply with quote

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 :)

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.
_________________
Best regards,

Klavs Klavsen
Denmark

Working with Unix is like wrestling a worthy opponent.
Working with windows is like attacking a small whining child
who is carrying a .38.


Last edited by Klavs on Thu Jun 30, 2005 7:12 am; edited 1 time in total
Back to top
View user's profile Send private message
Klavs
Guru
Guru


Joined: 22 May 2002
Posts: 536
Location: Denmark

PostPosted: Thu Jun 30, 2005 6:50 am    Post subject: Reply with quote

Arghh - typical:

/etc/xinetd.conf:
defaults
{
only_from = localhost
...

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

Fixed, by commenting it out.
_________________
Best regards,

Klavs Klavsen
Denmark

Working with Unix is like wrestling a worthy opponent.
Working with windows is like attacking a small whining child
who is carrying a .38.
Back to top
View user's profile Send private message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 568

PostPosted: Tue Aug 01, 2017 7:20 pm    Post subject: Reply with quote

Thanks. Made my day
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum