Iptalbes Kernel Module Missing on DigitalOcean VPS

Kernel Module Missing

After I update kernel version from 3.8.4-1 (the stock version come from DO’s Archlinux template), I have found that iptables was not working because of kernel module missing.

# iptables -S
iptables v1.4.12: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)

The reason is DigitalOcean’s way of kernel management. You can only specify a kernel in DO Droplet control panel, not upgrading kernel in your own VPS. By using this way of kernel upgrading, the kernel module building process of Archlinux was bypassed; in result, no kernel module for my 3.9.4-1 kernel. That’s why iptables did not work.

Take a look at /lib/modules, there are only 3.8.4-1 stuffs:

# ls /lib/modules
3.8.4-1-ARCH extramodules-3.8-ARCH

This article shows the same problem on DO’s VPS.

Build Kernel Module Manually

To resolve this issue, a manual building of kernel 3.9.4-1 is required. Check this for grabbing and build a specific version of Archlinux package.

On my particular case, from this page download the 3.9.4-1 linux package, extract and issue a “makepkg” command.

Makepkg Linux 3.9.4-1

Building had taken some time on my $5/m plan Digital Ocean droplet. When everything done, copy kernel modules to /lib/modules. Check /lib/modules to see if I have kernel modules for 3.9.4-1:

# ls /lib/modules
3.8.4-1-ARCH 3.9.4-1-ARCH extramodules-3.8-ARCH extramodules-3.9-ARCH

Finally try “modprobe” and “lsmod” to check if the issue had been fixed.

Try DigitalOcean

Interesting with VPS for devs? Click the logo below to have a try:DigitalOcean Ref Link

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.