Guardian lost all it's common sense

This wins the day… When your IDS/IPS tells you it lost all it’s common sense!!! LOL
image

All I did was run pakfire…
Hmmmmm…
Ideas?

1 Like

What exactly did you when running pakfire?

sigh…
for it to “just work”.
Maybe I lost my common sense too. :thinking:

So how do I fix it?

@mpyusko maybe reinstall the guardian addon, then start/restart it.

ref: wiki.ipfire.org - The Guardian 2.0 Addon

I don’t think this helps really. common::sense is a Perl module installed with the base system.
Can be found with
find /usr/lib -iname "sense*"

1 Like

So you’re telling me how to find some sense. :thinking: :stuck_out_tongue_winking_eye:

This is indeed a very interesting name for a Perl module.

Despite its existence I would say that common sense has still not landed in Perl, yet.

2 Likes

It’s like programming in Assembler. You can do many things, but to produce readable and maintainable code you should adhere some discipline. :wink:

FWIW… Uninstalling/Reinstalling Guardian didn’t fix it. However uninstalling/reinstalling common-sense did fix it.

I did expect this. common::sense isn’t a module installed with Guardian, but contained in the basic distribution.

Fresh upgrade to core 158 from core 155 - My guardian asks for Inotify2

Starting Guardian…
Can’t locate Linux/Inotify2.pm in @INC (you may need to install the Linux::Inotify2 module) (@INC contains: /usr/lib/perl5/site_perl/5.32.1/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.32…
BEGIN failed–compilation aborted at /usr/sbin/guardian line 27. [ FAIL ]

Core 158:
find /usr/lib/ -iname Inotify2
/usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/auto/Linux/Inotify2
ls /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/auto/Linux/Inotify2
Inotify2.so
ls /usr/lib/perl5/site_perl/5.32.1/x86_64-linux-thread-multi/auto/Linux/Inotify2
ls: cannot access ‘/usr/lib/perl5/site_perl/5.32.1/x86_64-linux-thread-multi/auto/Linux/Inotify2’: No such file or directory

core 155:
find /usr/lib/ -iname Inotify2
/usr/lib/perl5/site_perl/5.32.1/x86_64-linux-thread-multi/auto/Linux/Inotify2
/usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/auto/Linux/Inotify2

ls /usr/lib/perl5/site_perl/5.32.1/x86_64-linux-thread-multi/auto/Linux/Inotify2
Inotify2.so
ls /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/auto/Linux/Inotify2

Core 158 lost 5.32.1 ?
Now what?

late edit: on core 155 (where it worked) I removed and installed back the Inotify2 package: now core 155 also complains like core 158. So the package seems to be faulty…

Cheers!

I’m trying guardian for the first time and it’s still having problems with perl. To fix I created a symbolic link in perl library. I also had to create the two config files manualy because the cgi-script errored out. Still haven’t tested to see if it works yet, but at least I can get to the web page now.

I do have a friend that is using fail2ban, but this is a manual install and config, which is very involved.

Hope this helps other people.

cd /usr/lib/perl5/site_perl/5.30.0
ln -s ../5.32.1/Guardian .
cd /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi
ln -s ../../5.32.1/x86_64-linux-thread-multi/Linux .
cd /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi
ln -s ../../5.32.1/x86_64-linux-thread-multi/common .
cd /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/auto
ln -s ../../../5.32.1/x86_64-linux-thread-multi/auto/Linux .
cd /var/ipfire/guardian
touch ignored settings
chown nobody:nobody ignored settings

So now I get a loadable library mismatch because of te .so file. The problem is that guardian was writter for perl 5.32.1 and I have version 5.30.0 installed. I will try to update ipfire to latest build and test.

perl --version
This is perl 5, version 30, subversion 0 (v5.30.0) built for x86_64-linux-thread-multi

and it all works after updating I now have the correct version of perl installed.
IPFire 2.27 (x86_64) - Core Update 159

3 Likes