1

We're attempting to track down an issue a client is having with injecting large quantities of mail to our gateway, and somewhere along the line, his connections are being rejected. Unfortunately, beyond that, the client has not provided much useful data other than that he doesn't seem to be getting SYN ACK messages back.

We're looking to do some testing of our service and establish just how many TCP connections it can establish (and later, messages we can inject) before it chokes. Are there any utilities which I could use to establish thousands of simultaneous TCP connections to a target? No payload is necessary.

Ideally, this tool would give us a rundown of how many connections it was able to establish, or how rapidly, etc.

Any thoughts are highly appreciated!

Fabian
  • 19
  • 1
  • 2
  • 4
    Just go post on 4chan that they're all dicks. – ceejayoz Sep 18 '12 at 16:40
  • 1
    How is this test useful in troubleshooting the problem, exactly? How do you intend to correlate your results with the problem? – joeqwerty Sep 18 '12 at 16:42
  • We have clients that inject far more mail than the one which is having problem. We currently believe that it may be related to the number of concurrently open connections at one moment as this client likes to push in large amounts. This is the only difference between him and many of our other clients who do not have problems. – Fabian Sep 18 '12 at 16:44

1 Answers1

4

You could use hping to generate the traffic. But you'd be better off trying to actually replicate the real-world load.

hping Examples

Send TCP SYN packets to port 0 on host example.com (note that hping will increment the source port by 1 for each packet sent):

hping example.com -S -V

Send TCP SYN packets to port 443 on host example.com:

hping example.com -S -V -p 443

Send TCP packets to port 443 on host example.com with the SYN + ACK flags set:

hping example.com -S -A -V -p 443

Send TCP packets to port 443 on host example.com with the SYN + ACK + FIN flags set:

hping example.com -S -A -F -V -p 443

Send TCP SYN packets every 5 seconds to port 443 on host example.com:

hping example.com -S -V -p 443 -i 5

Send TCP SYN packets every 100,000 microseconds (i.e. every 0.1 second or 10 per second) to port 443 on host example.com. Note that verbose has been removed:

hping example.com -S -p 443 -i u100000

Send TCP SYN packets every 10,000 microseconds (i.e. every 0.01 second or 100 per second) to port 443 on host example.com:

hping example.com -S -p 443 -i u10000

Send TCP SYN packets every 10,000 microseconds (i.e. every 0.01 second or 100 per second) to port 443 on host example.com. Stop after 500 packets:

hping example.com -S -p 443 -i u10000 -c 500

Ben Lessani
  • 5,244
  • 17
  • 37