LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-07-2009, 02:47 AM   #1
grayFalcon
Member
 
Registered: Jan 2003
Distribution: Debian
Posts: 69

Rep: Reputation: 15
Tool for listening on a network port and forwarding data to an application?


Hello everybody!

May be that I have gotten things mixed up, but I seem to recall there being some program that was able to listen on a specified port and to run a specified program whenever something came in on that port... But I just can't find what the name of this tool was. And before I start rolling my own solution, I thought I'd ask if anyone knows of this

Thanks a lot in advance,
-grayFalcon
 
Old 10-07-2009, 02:51 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
What kind of thing? is this meant to be sniffing data, or something dedicated? iptables can watch a tcp connection and match strings, it's then possible to push that out to a log to watch and execute based on... or netcat is a simple way to recieve data and pass to a script for inspection.
 
Old 10-07-2009, 03:11 AM   #3
grayFalcon
Member
 
Registered: Jan 2003
Distribution: Debian
Posts: 69

Original Poster
Rep: Reputation: 15
Well, what I have is an application that takes a bit of data and prints out a result. I remember that there was some tool that I could tell to listen on port X, and when data comes in, to do something with this data (in my case: write it to a file and start the application).

Basically I'm looking to create a very lightweight web servicey thing, and I thought there was something lighter than a full web server for doing this.
 
Old 10-07-2009, 04:04 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well yeah, you can make netcat listen and pipe the output to whatever you want. That way can lie security risks of course... but it's amazingly simple to do. Also trivial to run a perl / python / etc. script to listen on a port and process incoming data too plenty of examples online to modify.
 
Old 10-07-2009, 04:09 AM   #5
grayFalcon
Member
 
Registered: Jan 2003
Distribution: Debian
Posts: 69

Original Poster
Rep: Reputation: 15
Thanks, netcat was what I'm looking for I already have python scripts doing more complex stuff (where session handling and such is necessary), but I was hoping to get around this, since the current problem is pretty trivial. I don't like using a tank to shoot flies

Thanks a lot again,
greets,
-grayFalcon
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
port forwarding for network alias dlugasx Linux - Server 1 08-13-2009 10:53 AM
Application for stream forwarding to local network stringZ Linux - Software 4 07-11-2007 05:33 PM
Port forwarding Application edman007 Solaris / OpenSolaris 5 09-08-2006 01:59 AM
http port forwarding: outside network not working sharathg786 Linux - Networking 2 08-12-2006 11:37 PM
Forwarding data from port to another Mikessu Linux - Networking 0 02-05-2004 03:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration