Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Iptables v1.4.14: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)

I'm trying to set iptable rules, and I got following error message when I use iptable :

iptables v1.4.14: can't initialize iptables table `nat': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. 

I'm using :

cat /etc/debian_version  7.4  uname -a Linux myserver 2.6.32-22-pve #1 SMP Mon Jul 15 08:36:46 CEST 2013 x86_64 GNU/Linux  uname -r 2.6.32-22-pve 

This is a virtual server hosted by a service provider.

What can I do to solve this?

like image 738
Douglas Avatar asked Feb 24 '14 09:02

Douglas


2 Answers

I had the same problem with Debian 8. I fixed it by restarting the system. It seems that the error can occur if the kernel image was updated and the system was not restarted thereafter.

like image 54
JayTheKay Avatar answered Oct 25 '22 23:10

JayTheKay


I had the same problem and this worked:

sudo modprobe ip_tables sudo echo 'ip_tables' >> /etc/modules 

http://www.howtoforge.com/forums/showthread.php?t=3196

like image 44
conrad Avatar answered Oct 25 '22 22:10

conrad