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 doe
IP talbes is just a management tool not the real woker who handle the rules. The real worker is a linux kernal module which iptables relies on. This error happens while iptalbes cannot found that module in kernal, so iptables suggest you to upgrade it :)
Perhaps iptables or your kernel needs to be upgraded.
However in most cases it's just the module not added to kernal or being banned, try this command to check whether be banned:
cd /etc/modprobe.d/ && grep -nr iptable_nat
if the command shows any rule matched, delete it. If nothing found in blacklist, try add iptable-nat to the kernal manual:
modprobe iptable-nat
If all of above not works, you can consider really upgrade your kernal...
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
On OpenSUSE 15.3 systemd log reported this error (insmod suggestion was unhelpful).
Feb 18 08:36:38 vagrant-openSUSE-Leap dockerd[20635]: iptables v1.6.2: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
REBOOT fixed the problem
Finaly, my service provider answered :
This is a limitation of the virtualization system we use (OpenVZ), basic iptables rules are possible but not those who use the nat table.
If this really is a problem, we can offer you to migrate to a other system virtualization (KVM) as we begin to offer our customers.
SO I had to migrate my server to the new system...
The table names are case-sensitive so you should use lower-case nat instead of upper-case NAT. For example;
iptables -t nat -A POSTROUTING -s 192.168.1.1/24 -o eth0 -j MASQUERADE
"IP conntrack functionality has some negative impact on venet performance (uo to about 10%), so they better be disabled by default." It's need for nat
https://serverfault.com/questions/593263/iptables-nat-does-not-exist