Find the answer to your Linux question:
Results 1 to 2 of 2
Hello, 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2012
    Posts
    29

    Problems with xinetd configuration


    Hello,
    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:

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

    Code:
    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:
    Code:
    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
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,709
    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
  •