?
Solved

Script to Simulates seeral simultaneous accesses at Port 25

Posted on 2006-05-17
5
Medium Priority
?
309 Views
Last Modified: 2012-06-27
Hi:

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?

Thanks.

Mario./
0
Comment
Question by:multisites
5 Comments
 
LVL 16

Expert Comment

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

This should do the trick
0
 
LVL 16

Accepted Solution

by:
xDamox earned 200 total points
ID: 16711222
Hi,

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

#!/bin/bash

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

This will create 30 telnet connections.
0
 
LVL 16

Expert Comment

by:Blaz
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.
0
 

Author Comment

by:multisites
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.
0
 
LVL 15

Expert Comment

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

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