Script to Simulates seeral simultaneous accesses at Port 25

Posted on 2006-05-17
Medium Priority
Last Modified: 2012-06-27

I have a Linux server which runs a Script that analyses all the emails received at Port 25. Whenever it sees more than "n" (say 20) simultaneous accesses from a same IP address, it realizes someone is Spaming at the server. So, it blocks that IP.

My question: I need to test it. Is there any Script I could run in another Server, simulating this situation, so that the Script blocks that IP?


Question by:multisites
LVL 16

Expert Comment

ID: 16706146
Well, you could simply invoke 20 telnet connections to port 25:
telnet server 25 &

This should do the trick
LVL 16

Accepted Solution

xDamox earned 200 total points
ID: 16711222

To do it you would create a bash script as follows:


for i in `seq 1 30`;
  echo "Connection $i";
  telnet IP 25

This will create 30 telnet connections.
LVL 16

Expert Comment

ID: 16715370
Actually the script xDamox posted does not create any simultaneous connections. Each connection is opened and immediately closed so you have only one simultaneous connection.

That's why I didn't suggest a bash script for this, but only command prompt command - that way you can create simultaneous connections.

Author Comment

ID: 16716773
Wow, thanks Blaz, it is a pitty I have closed the question. I really was not able to realize this point. Anyway, thanks a lot.
LVL 15

Expert Comment

ID: 16720446
You can always ask community support to re-open a question for you: http://www.experts-exchange.com/Community_Support/

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
Fine Tune your automatic Updates for Ubuntu / Debian
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question