How Do I Upgrade Fail2ban 0.8.14 to 0.10.3 ?

I need to upgrade fail2ban 0.8.14 to 0.10.3.  I am on a Linux 2 server which prevents me from loading any repositories or using Yum to install it.

So, I need to know the steps to get my fail2ban upgraded.  

Thanks,
sharingsunshineAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nociSoftware EngineerCommented:
Download fail2ban from:  http://www.fail2ban.org/
Then this should... be done (according to the README.md...)
    tar xvfj fail2ban-0.10.3.tar.bz2
    cd fail2ban-0.10.3
    python setup.py install

After which the setup should be in /etc/fail2ban....
0
sharingsunshineAuthor Commented:
Do I need to remove what is there already?  If so, what commands will remove the files.
0
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Yes. Remove installed Fail2Ban first, via your package manager.

Looks like Linux 2 uses yum, so you'll remove your Fail2Ban RPMs via a yum command... likely...

yum remove fail2ban

Open in new window


If this fails, then likely Fail2Ban has another package name, which you'll have to dig around to find... likely...

yum list installed | grep -v fail2ban

Open in new window

0
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

sharingsunshineAuthor Commented:
Yes, Linux 2 uses Yum but in my original question please note:

I am on a Linux 2 server which prevents me from loading any repositories or using Yum to install it.
0
nociSoftware EngineerCommented:
You can make a backup of the current /etc/fail2ban before removing it. You jails would be handy to keep near by at hand to either use again or use as template for a new jails.
0
sharingsunshineAuthor Commented:
I made a backup of the jails and filters but I am having trouble getting the archive to explode.  I used wget from the git archives.

https://gyazo.com/33c28abe472d6a6d9d18bb3e1ca35409

Open in new window


Here is the listing of the directory showing the archive and what it is named.

https://gyazo.com/391841820343d6e228b729f0bdaa5aaf

Open in new window

0
Prabhin MPEngineer-TechOPSCommented:
before removing the fail2ban  take backup of custom configuration if any,

download the latest fail2ban from following link,

https://github.com/fail2ban/fail2ban/archive/0.10.tar.gz
 extract and install
 make sure yiu have python version >=2.6

   tar xvfj fail2ban-0.10.3.tar.bz2
    cd fail2ban-0.10.3
    python setup.py install
0
nociSoftware EngineerCommented:
try:   wget https://github.com/fail2ban/fail2ban/archive/0.10.tar.gz  or curl https://github.com/fail2ban/fail2ban/archive/0.10.tar.gz -o fail2ban-0.10.3.tar.bz2
I have no idea what gyazo  is...
fail2ban is maintained ongithub, so that is the original source.
0
sharingsunshineAuthor Commented:
gyazo is just a screenshot application

[root@ip-172-31-8-214 ~]# ls -la
total 84
dr-xr-x---  4 root root   244 Sep  2 10:46 .
dr-xr-xr-x 20 root root   283 Jul 25 16:52 ..
drwxr-xr-x  2 root root    25 Jul 22 17:49 .aws
-rw-------  1 root root 23742 Sep  2 05:21 .bash_history
-rw-r--r--  1 root root    18 Oct 18  2017 .bash_logout
-rw-r--r--  1 root root   176 Oct 18  2017 .bash_profile
-rw-r--r--  1 root root   176 Oct 18  2017 .bashrc
-rw-r--r--  1 root root   100 Oct 18  2017 .cshrc
-rw-r--r--  1 root root   123 Sep  2 10:46 fail2ban-0.10.3.tar.bz2
-rw-------  1 root root   866 Sep  2 04:38 .mysql_history
-rwxr-xr-x  1 root root 22322 Jul 26 12:09 ps_mem.py
-rw-------  1 root root  1024 Aug 21 07:34 .rnd
drwx------  2 root root    29 Jul 10 17:46 .ssh
-rw-r--r--  1 root root   129 Oct 18  2017 .tcshrc
-rw-r--r--  1 root root  1974 Jul 17 13:17 tortix-install.log
[root@ip-172-31-8-214 ~]# tar xvfj fail2ban-0.10.3.tar.bz2
bzip2: (stdin) is not a bzip2 file.
tar: Child returned status 2
tar: Error is not recoverable: exiting now

Open in new window

0
nociSoftware EngineerCommented:
File file fail2ban-0.10.3.tar.bz2 probably tells you it is html...
Try to add -L to the curl command lineto pickup redirects.   (curl is more a basic API which needs to be told more)
curl -L https://github.com/fail2ban/fail2ban/archive/0.10.tar.gz -o fail2ban-0.10.3.tar.bz2

That should yield the bz2 file...  file fail2ban-0.10.3.tar.bz2  will tell you..
0
Prabhin MPEngineer-TechOPSCommented:
tar jxf filename.tar.bz2 should work
0
sharingsunshineAuthor Commented:
I got the file but I am still getting an error:

[root@ip-172-31-8-214 etc]# tar xvfj fail2ban-0.10.3.tar.bz2
bzip2: (stdin) is not a bzip2 file.
tar: Child returned status 2
tar: Error is not recoverable: exiting now
[root@ip-172-31-8-214 etc]# tar jxf fail2ban-0.10.3.tar.bz2
bzip2: (stdin) is not a bzip2 file.
tar: Child returned status 2
tar: Error is not recoverable: exiting now

Open in new window

0
nociSoftware EngineerCommented:
Order of command character IS mandatory....
jxf != xfj != xjf


The first SHOULD be the command...,  x,t, c... (eXtract,Test, Create)
f next argument is a filename
so xjf or xfj is meaningfull for eXtract, BZ2 format File ...
jxf is unkown action on ??? file... (but it seems acceptable to some versions of tar... i am sure not all of them).
The Downloaded archive isn;t a bzip2 but a gzip file... well this is surpising as the instructions mention it is a bz2...
anyway for gzip use z in stead of j...
tar xzvf fail2ban-0.10.3.tar.bz2  or tar xvfz ail2ban-0.10.3.tar.bz2
(The error message mentions bzip2 not recognizing it's input)...
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Expanding on noci's update... the f option must directly before file, so just swap your f + j.

 Likely tar jxf fail2ban-0.10.3.tar.bz2 fails because you may have a corrupt file.

Try file fail2ban-0.10.3.tar.bz2 + see if you have some other magic number (file type) come up.
0
sharingsunshineAuthor Commented:
Noci, your responses were correct and also your extract command.  I have it installed now but there is some problem with not all of the jails working.  However, I will create another question about that.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Installation

From novice to tech pro — start learning today.