After ubuntu server upgrade, it has error with commandline "iptables -L"

November 28, 2014 7.7k views

after I upgrade ubuntu server to Ubuntu 1404 , Linux 3.16.0-23-generic #30-Ubuntu SMP Thu Oct 16 13:22:53 UTC 2014 i686 i686 i686 GNU/Linux,
it has error when run command "iptables -L", errors:

modprobe: ERROR: ../libkmod/libkmod.c:556 kmodsearchmoddep() could not open moddep file '/lib/modules/3.16.0-23-generic/modules.dep.bin'
iptables v1.4.21: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

Actually there is no folder named 3.16.0-23-generic under folder /lib/modules/, there is folder named 3.13.0-40-generic

anyone can help me about this?

1 comment
  • Today I received a letter:

    "Please review the following abuse complaint and provide us with a resolution:

    You appear to be running an open recursive resolver at IP address 198.211.xx.xx that participated in an attack against a customer of ours, generating large UDP responses to spoofed queries, with those responses becoming fragmented because of their size.

    Please consider reconfiguring your resolver in one or more of these ways:

    To only serve your customers and not respond to outside IP addresses (in BIND, this is done by defining a limited set of hosts in "allow-query"; with a Windows DNS server, you would need to use firewall rules to block external access to UDP port 53)"

    All this happened due to the fact that the firewall will not start :(

3 Answers

Run the following command and then reboot your droplet to fix it:

sudo apt-get install linux-image-$(uname -r)
That should install your Droplet's kernel and the corresponding modules on the Droplet.

I found this solution at:
https://www.digitalocean.com/community/questions/error-while-allowing-ssh-connections-on-ufw

if it didnt work, try to execute the command :

sudo apt-get install --reinstall linux-image-3.13.0

and just remember, this is only for ubuntu 14.04

Thank you

sudo apt-get install linux-image-$(uname -r)

and rebooting worked for me

I had resized the droplet and ran into a couple of these strange behaviors ...

Have another answer? Share your knowledge.