Link to home
Start Free TrialLog in
Avatar of Mike Paradis
Mike Paradis

asked on

Linux tcp ports listening for testing

I need to set up a range of tcp ports, lets say 12000-12025 in order to test some sort of app that the programmers are working on. I've searched and find suggestions such as using netcat. However, I need something that will start up as a daemon, take up little to nothing for resources, simply reply with some form of acknowledgement, no data, maybe simple an ACK.

I'd like this to be secure of course with no chance of using it to gain access to anything on the server.
The server will be a centos7 server.

Netcat was a quick test but doesn't seem to be a good solution for something long term. Connecting to one of those ports using a browser gives me;

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Upgrade-Insecure-Requests: 1

-No data what so ever should be returned by the server other than the simplest, smallest acknowledgement.
-No port blocking what so ever if something is already connecting to this port.

Using curl to test netcat for example seems to kill netcat once curl has connected. Also, netcat returns;
GET / HTTP/1.1
User-Agent: curl/7.29.0
Host: tpw.nutpile.com:20128
Accept: */*

Which is much too much data. Probably need some sort of tiny script or known program that can accomplish this simple task but cannot find such on the Internet so, asking here.
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

There are 'improved' versions of netcat that you might try such as Ncat https://nmap.org/ncat/ .  I've never used any of them.
Avatar of Mike Paradis
Mike Paradis

ASKER

Yes though as mentioned, nc, netcat are things we've been playing with for testing. I need something that is more of a daemon, known to be secure running as a service that could respond as I need it to.
ASKER CERTIFIED SOLUTION
Avatar of Rick Beck
Rick Beck
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, I am familiar but that was not a solution. We've decided to use udp ports and write our own responder.