Could not load modules.dep: No such file or directory

Asked by DeneS

Hi

Installed fail2ban (apt-get -t unstable install fail2ban) on 9.04 server on a vps

when I do 'iptables -L'

I get the following;

chain INPUT (policy ACCEPT)
target prot opt source destination
FATAL: Could not load /lib/modules/2.6.18-128.1.1.el5.028stab062.3/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.18-128.1.1.el5.028stab062.3/modules.dep: No such file or directory
fail2ban-ssh tcp -- anywhere anywhere multiport dports ssh

what is "FATAL: Could not load /lib/modules/2.6.18-128.1.1.el5.028stab062.3/modules.dep: No such file or directory"

This looks bad. Is it? How can this be fixed?

tx
Dene

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu fail2ban Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

I would reinstall the kernel you are using, it should readd the file. Your kernel version concerns me.

Can you please provide the output of:

uname -a; lsb_release -a

Thanks

Revision history for this message
DeneS (repsaj) said :
#2

Hi

Thanks for your help.

Output from using this "uname -a; lsb_release -a" on the vps server is as per below;

Linux server45.abcxyz.com 2.6.18-128.1.1.el5.028stab062.3 #1 SMP Sun May 10 18:54:51 MSD 2009 i686 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 9.04
Release: 9.04
Codename: jaunty

Regards
Dene

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

http://pastebin.com/f4293ecd3

Thats my file, I use Karmic but I'd imagine it may help. Just put the text into the file you are missing and see how you go. If its no good, just delete the file

Revision history for this message
DeneS (repsaj) said :
#4

actionparsnip

Saved that text to the .deb file

the deb file / directory error is gone

error is now different

FATAL: Could not open '/lib/modules/2.6.18-128.1.1.el5.028stab062.3/kernel/net/ipv4/netfilter/ip_tables.ko': No such file or directory

tx
Dene

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Try editting that line out

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

Try editting that line out

Revision history for this message
DeneS (repsaj) said :
#7

actionparsnip

erased that line

now says;
Chain INPUT (policy ACCEPT)
target prot opt source destination
fail2ban-ssh tcp -- anywhere anywhere multiport dports ssh

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain fail2ban-ssh (1 references)
target prot opt source
RETURN all -- anywhere anywhere

So it looks like its working to me

What do you think?

Regards
Dene

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#8

Not sure dude. Try doing what you do to make sure all is well.

Revision history for this message
DeneS (repsaj) said :
#9

hmm - only installed fail2ban for first time - so don't know how to make sure all is well

will look at logs and see if it does its stuff when logins fail and it bans that ip

thanks for the help
Dene

Revision history for this message
Sebastian Klus (klus-spam) said :
#10

Hi there,

I know that this thread is quite old, but it matches perfectly my situation, so I am picking it up from here.

I am running a vserver (and I believe that's an issue) with the following kernel:
Linux vs###.#######.de 2.6.26-2-openvz-amd64 #1 SMP Thu Nov 5 03:06:00 UTC 2009 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.10
Release: 8.10
Codename: intrepid

And when running iptables -L, I get exactly the previously described error message.
Although, looking at the fail2ban.log, everything seems fine and the corresponding services seem to come up correctly.

Nevertheless one doubt:
According to filter apache-noscript, entries in the apache error log saying "File does not exist" (among others) should be captured, correct? Now if called intentionally a file on my server that does not exist, and assuming that file2ban works correctly, I should be banned, right?
Checking the apache error log, I see my intents, so from this side everything should be fine. But checking fail2ban.log and iptables -L, I cannot perceive any reaction.

So my question is:
Might this FATAL error message have to do something with it?

Let me know, if I can provide any additional information.

Thanks,
Sebastian