Start netcat listening session with inetd(or other)
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Start netcat listening session with inetd(or other)
I´m currently setting up an old laptop to act as a "wireless music player".
To do this, I`m using netcat to receive and then pipe the audio stream via sox into rawplay.
Is there a way to configure inetd to automatically start netcat when port 5454 is accessed?
The way it is now I have to ssh into the box to start the shell script that sets up the netcat/sox/rawplay pipe manually, and it would be nice to have this done by inetd or some other service.
I just thought that you might not want a port open for netcat. The netcat command is also a tool that crackers love. It is almost like a net enabled dd command.
Take a look at the configs in /etc/xinet.d/ and base your config on one of them. There are two things to consider. First, you could create a system user to run the service as. Second, read up on running your service in a jail.
Both netcat and xinetd can work with udp datagram streams as well as tcp connections. Udp would be a better choice for delivering live media.
Well, this machine is connected to my internal network only, so security isn't paramount. Also I'm on Slackware 11, which I think use inetd. I tried setting up port 5454 in /etc/services, like this:
wfstream 5454/tcp
wfstream 5454/udp
and adding a corresponding line in /etc/inetd.conf, like this:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.