Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Problems with xinetd configuration

    I want to use xinetd in conjunction with netcat. netcat shall dispatch small messages that contain usernames to the server on which xinetd is running and listening for incoming connections.
    I could also accomplish this with rsh/ssh, but I decided to use netcat, because here I can choose between UDP and TCP, whereas rsh/ssh are always TCP-based.

    The client works like this:

    exec 5<> /dev/tcp/$host/$port
     while true
       sleep 2
       echo "check connection">&5
    exit 0
    In etc/xinetd.d I added this file:

    service notify
            disable         = no
            socket_type  = stream
            port             = 4700
            server          = /usr/local/bin/message
            user             = nobody
            wait             = no

    The message file contains only an echo command to check if it has been called.

    In /etc/services I added this line:
    notify         4700/tcp
    However, that doesn't work and I'm getting a "connect: Connection refused" message. What did I do wrong?

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    What does /usr/local/bin/message do? Is it accepting messages on port 4700? Is that the port the client is sending to?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts