12-29-2018
Wouldn't a periodical sort -u of the final result file solve those problems in one go at minimal cost? I'd guess searching the entire file for each new IP could become resource hungry.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi Gurus,
I had a question regarding avoiding duplicates.i have a file abc.txt
abc.txt
-------
READER_1_1_1> HIER_28056 XML Reader: Error occurred while parsing:; line number ; column number
READER_1_3_1> Sun Mar 23 23:52:48 2008
READER_1_3_1> HIER_28056 XML Reader: Error occurred while... (7 Replies)
Discussion started by: pssandeep
7 Replies
2. Shell Programming and Scripting
Hi all.
I want to check the free space on a given FS and process the output. Right now, I'm using a temp file to avoid using df twice. This is what I'm doing
#!/usr/bin/ksh
...
df -k $FS_NAME > $TMP_FILE 2>&1
if ]; then
RESULT="CRITICAL - $(cat $TMP_FILE)"
else
cat $TMP_FILE | ...... (3 Replies)
Discussion started by: fox1212
3 Replies
3. HP-UX
Good afternoon.
I am a newbie.
We just had a potentially big problem (negated to having good backups).
Basically, there is an option in SAM, to delete all the data from the system that a user ever created.
Lo and behold, silly me, I choose that option, and all sorts of needed files... (5 Replies)
Discussion started by: instant000
5 Replies
4. Shell Programming and Scripting
Guys
following lines help me in getting numbers from PID column ,to be thrown into first column of a CSV file.
COLUMNS=2047 /usr/bin/ps -eo pid,ppid,uid,user,args | grep -v "PID" > /tmp/masterPID.txt
cat /tmp/masterPID.txt|while read line
do
PID=`echo $line|awk '{print $1}'`
echo "$PID"... (4 Replies)
Discussion started by: ak835
4 Replies
5. Shell Programming and Scripting
Hi Everyone,
# cat a.txt
94,aqqc,62345907,
5,aeec,77,
# cat 1.pl
#!/usr/bin/perl
use strict;
use warnings;
use Date::Manip;
open(my $FA, "/root/a.txt") or die "$!";
while(<$FA>) {
chomp;
my @tmp=split(/\,/, $_);
if (index($tmp, "qq") ne -1) {
... (4 Replies)
Discussion started by: jimmy_y
4 Replies
6. Programming
Hi,
My Code is as below:
nbECRITS = fwrite(strstr(data->buffer, ";") + 1, sizeof(char), (data->buffsize) - LEN_NOM_FIC, fic_sortie);
fclose(fic_sortie);
sprintf(PATH_BALISE, "%s.balise", PATH);
fic_balise_data = fopen(PATH_BALISE, "a+");
if (fic_balise_data == NULL) {... (1 Reply)
Discussion started by: ezee
1 Replies
7. Shell Programming and Scripting
Hi alll
I have a file with following kind input
I want in output duplicates should not be there but there should be numbering mentioned before that like (4 Replies)
Discussion started by: manigrover
4 Replies
8. Shell Programming and Scripting
Hi all
I have a file with following input
It contains 5 columns
gene name drug drug ID disease approved
Now the same gene is repeated many times with different data in column2,3 ,4,5
I want to arrange dat in such a way that there shuld be one entry in the column(no... (2 Replies)
Discussion started by: manigrover
2 Replies
9. Shell Programming and Scripting
Hello,
I am trying to run some code on Matlab over ssh . The code takes around 5-6 hours to complete. so after giving the command to run it , I locked my machine and then went off to sleep at night, only to discover in the morning that I get this message :
...Code running, partial results... (1 Reply)
Discussion started by: ajayram
1 Replies
10. Shell Programming and Scripting
Hello,
I have been working on script in which search and replace the multiple pattern.
1. update_params.sh read the multiple pattern from input file ParamMapping.txt(old_entry|New_entry) and passing this values one by one to change_text.sh
2. change_text.sh read... (0 Replies)
Discussion started by: ketanraut
0 Replies
LEARN ABOUT CENTOS
fail2ban
FAIL2BAN(1) General Commands Manual FAIL2BAN(1)
NAME
fail2ban - a set of server and client programs to limit brute force authentication attempts.
DESCRIPTION
Fail2Ban consists of a client, server and configuration files to limit brute force authentication attempts.
The server program fail2ban-server is responsible for monitoring log files and issuing ban/unban commands. It gets configured through a
simple protocol by fail2ban-client, which can also read configuration files and issue corresponding configuration commands to the server.
For details on the configuration of fail2ban see the jail.conf(5) manual page. A jail (as specified in jail.conf) couples filters and
actions definitions for any given list of files to get monitored.
For details on the command-line options of fail2ban-server see the fail2ban-server(1) manual page.
For details on the command-line options and commands for configuring the server via fail2ban-client see the fail2ban-client(1) manual page.
For testing regular expressions specified in a filter using the fail2ban-regex program may be of use and its manual page is fail2ban-
regex(1).
LIMITATION
Fail2Ban is able to reduce the rate of incorrect authentications attempts however it cannot eliminate the risk that weak authentication
presents. Configure services to use only two factor or public/private authentication mechanisms if you really want to protect services.
A local user is able to inject messages into syslog and using a Fail2Ban jail that reads from syslog, they can effectively trigger a DoS
attack against any IP. Know this risk and configure Fail2Ban/grant shell access accordingly.
FILES
/etc/fail2ban/*
AUTHOR
Manual page written by Daniel Black and Yaroslav Halchenko
REPORTING BUGS
Report bugs to https://github.com/fail2ban/fail2ban/issues
COPYRIGHT
Copyright (C) 2013
Copyright of modifications held by their respective authors. Licensed under the GNU General Public License v2 (GPL).
SEE ALSO
fail2ban-server(1) fail2ban-client(1) fail2ban-regex(1) jail.conf(5)
Fail2Ban March 2013 FAIL2BAN(1)