I installed fail2ban from EPEL using
yum install, and then proceeded to screw up the configuration after forgetting to back up
Now I want the original configuration back.
First I tried
yum reinstall fail2ban, but that was silly because
yum install doesn't overwrite existing configuration files. Then I
/etc/fail2ban somewhere else and tried
yum reinstall fail2ban again, which according to some old blog post would give me the original configuration back. No such luck. I tried uninstalling with
rpm -e and reinstalling. No such luck. I got frustrated and
rm -rfed my
/etc/fail2ban.backup directory, thinking maybe there was some kind of weird system discovery going on. Still nothing after reinstalling.
Finally I downloaded and unpacked the RPM source and
config directory to
/etc/fail2ban, which got me most of the way there. But there are still a few differences in how the log files are set up and in how it integrates with systemd. Instead of Frankensteining something together, I really just want the original configuration back.
Is there a way to force a fresh install of an RPM package, including config and log files, either with YUM or some other tool? I'm using the standard Linode CentOS 7 image, if that matters at all.