Question

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

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 kmod_search_moddep() 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?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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

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 …

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