I am using a bash script for CentOS 5.5, I found one and modified it, however I want to block the incoming IP addresses and ALLOW the IP addresses that are blocked to send out email.
I will use an internal network range for an example, 10.10.10.0/24 (if a lot of spam is incoming) from this range I want to allow the user to send out to the range.
How do I add allow 10.10.10.0/24 to this script to allow the connection to send out?
The problem I run into is I get a lot of server bruteforce attacks and spamming, yet the customer may email the user on the 10.10.10.0/24 network. We have spam devices in front of the email servers, however this does not stop the spammer from sending directly to the email server.
In the end I just want to DROP the incoming (bad IP's) and allow the (bad IP's) to send out if that makes sense.
Any help would be great.
Last edited by pludi; 06-29-2010 at 02:06 AM..
Reason: code tags, please...
I'm new to utilities like socat and netcat and I'm not clear if they will do what I need.
I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes.
I'm using Cygwin bash on Windows 10.
My... (3 Replies)
Hy over there,
Lets make it simple :)
Using a bash script, how to grep only the ip address and the mac address and put them in a file:.
for example from the dhcp.conf file we got such things:
The script will end up with two columns IP's and MAC adresses as it is showed below:
... (9 Replies)
I've been trying to have an array of ip addresses go through a loop one at a time. Then compare if the current element is in another array of ip addresses. I've traced my error with /bin/bash -x
+ for c in '"${ip}"'
./netk5: line 65: 50.17.231.23 23.64.146.110 23.64.159.139 107.14.36.129... (17 Replies)
Hello
Is there an easy way to login to various ip's..one after the other. I need to login to about 30 aix boxes and put a file in each one...
Cheers (1 Reply)
Hello
Is there an easy way to login to various ip's..one after the other. I need to login to about 30 aix boxes and put a file in each one...
Cheers (1 Reply)
Hello
I'm beginner in the linux scripting and i would like to get help. I want to create a script that can block one or more Port even see all the TCP port. The ports must be blocked even when starting my machine.
Of course requires a second script which will allow the ports that you want to... (0 Replies)
Hi all
i need to create a script that pings every server in my range (0-254) adn then returns the values to a file? can anyone please help. i am working in the tcsh ( and yes i know how to ping ) but i dont know how to ping them all in one script without copying and pasting a 254 times?
... (1 Reply)
Hi, I need script that will allow me to connect to multiple clients using ssh on Ubuntu terminal...
I have a txt file with the ip addresses of clients, i need a script that will connect to everyone one by one and send some commands...
The idea is to check some settings on every client... (2 Replies)
Suppose i have a txt file that is the list of the addresses,something like:
lala0045 john james
lala0234 george james
and i want to send an email to lala0045@blabla.com and lala0234@blabla.com,the same domain...what is the exact syntax i should use in my script?
there is a command... (10 Replies)
Hello,
I want to know is it possible to pass a block of sentence using bash.
For example,
I have a script called Test.sh that takes in $1 and $2.
and I'm calling Test.sh in a.sh
so
in a.sh
Test.sh '' 'This is a sentence'
Because block are separated by space so when I do that, I get... (6 Replies)