You are not logged in.

#1 2010-06-23 23:30:16

tommed
Member
From: Berkshire, Engalnd
Registered: 2009-06-10
Posts: 54
Website

[SOLVED] Can't get xinetd to work FAIL: SERVICENAME libwrap

Hi Guys,

I installed xinetd from core and started the daemon with the following service file in /etc/xinetd.d/

service pingback
{
        disable         = no
        server          = /home/me/pingback.sh
        id              = pingback
        socket_type     = stream
        wait            = no
        flags           = REUSE
        instances       = 25
        user            = root
        protocol        = tcp
        log_type        = FILE /var/log/pingback.log
        log_on_success  = HOST PID
        log_on_failure  = HOST
}

Here is /home/me/pingback.sh:

#!/usr/bin/env bash
echo $(uptime)

/etc/hosts.allow:

pingback : ALL : ALLOW
xinetd : ALL : ALLOW

/etc/services:

pingback     8082     # my pingback service

When I attempt to access is via netcat (nc -v 127.0.0.1 8082) (have also tried ktelnet localhost 8082), I get:

127.0.0.1 8082 (pingback) open

...and nothing else. When I look in my log file, a failure has been reported, but I don't understand what is going wrong?! HELP!

10/6/24@00:11:22: START: pingback pid=2524 from=127.0.0.1
10/6/24@00:11:22: FAIL: pingback libwrap from=127.0.0.1
10/6/24@00:14:59: START: pingback pid=2558 from=127.0.0.1
10/6/24@00:14:59: FAIL: pingback libwrap from=127.0.0.1
10/6/24@00:22:31: START: pingback pid=2649 from=127.0.0.1
10/6/24@00:22:31: FAIL: pingback libwrap from=127.0.0.1
10/6/24@00:22:39: START: pingback pid=2652 from=127.0.0.1
10/6/24@00:22:39: FAIL: pingback libwrap from=127.0.0.1
10/6/24@00:22:48: START: pingback pid=2654 from=127.0.0.1
10/6/24@00:22:48: FAIL: pingback libwrap from=127.0.0.1
10/6/24@00:22:51: START: pingback pid=2656 from=127.0.0.1
10/6/24@00:22:51: FAIL: pingback libwrap from=127.0.0.1
10/6/24@00:23:03: START: pingback pid=2658 from=127.0.0.1
10/6/24@00:23:03: FAIL: pingback libwrap from=127.0.0.1
10/6/24@00:28:37: START: pingback pid=2665 from=127.0.0.1
10/6/24@00:28:37: FAIL: pingback libwrap from=127.0.0.1

Thanks!

BTW: There are no errors in the daemon.log, it actually says my service is active!

Last edited by tommed (2010-06-25 10:03:09)

Offline

#2 2010-06-25 10:02:36

tommed
Member
From: Berkshire, Engalnd
Registered: 2009-06-10
Posts: 54
Website

Re: [SOLVED] Can't get xinetd to work FAIL: SERVICENAME libwrap

I noticed that the following forum post had the same problem:

http://bbs.archlinux.org/viewtopic.php?id=57281

The solution was to allow all from local loop interface:

ALL : 127.0.0.1

This isn't ideal, but also concludes that the correct service name is yet to be added to the hosts.allow file for this to work.

So I started investigating, using the filename in /etc/xinet.d and the name of the script the server points to, when I figured it out:

SOLUTION:
You have to specify the name of the script file or service (in the service attribute in your xinetd config file) in hosts.allow!

So for my service in the top post, I need to add the following to hosts.allow:

pingback.sh : 127.0.0.1 : ALLOW

Offline

Board footer

Powered by FluxBB