I'm interested in stress testing my gateway server but am lost on how. Most of the stress testing applications I've seen only see how much load an app like Apache can handle, but not this.

Essentially I want to send as many packets I can into this box with one computer on one card and see how many come out the other in another computer just to get an idea of what kind of load this can handle. I'm also interested how Snort will perform. I'm not really sure how to do this though.

What tools could you recommend that could do this?

4 Answers 4


If you are just looking at doing raw TCP/UDP packets (network testing) I would look at iperf. It supports both UDP and TCP.

You set it up on both sides of the gateway, one will act as the client and the other the server.

  • I used this today, great program! Cross platform, easy to install, and very easy to use. Thanks!
    – TheLQ
    Feb 1, 2011 at 2:42

Simplest stress test uses netcat. That's just for the flow rate though. If you want to stress the speed of opening and closing connection, you need something else.


Set two linux boxes (A & B) on each side of the gateway. On A, start a netcat server that serves zeros:

nc -l -p 1234 < /dev/zero

On B, connect to A using netcat also, and throw the zero away to /dev/null

nc 1234 > /dev/null

You can use iptraf to monitor the speed of the connection on either A or B or the gateway. You can also use a tool like readspeed to monitor the speed of the transfert of zeros (it's the data speed transfert, which is to the speed of the connection minus the ethernet/ip/tcp headers)

on A

$ nc -l -p 1234 < /dev/zero

on B

$ nc 1234 | ./readspeed 
61710848 octets en 0:02:03 = 74504 ko/s (75121 ko/s avg)

(That's the speed between my laptop and my server over a gigabit link).


FreeBSD and Linux have packet generator in kernel. It is very high speed. FreeBSD have ng_source node to generate packets. Linux have pktgen. but they are harder to use than userspace applications.


I'd recommend Mausezahn. It's very flexible and quite fast.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.