Partially execute yumupdate to upgrade or compile the Linux kernel. after the upgrade is completed, restart or start iptables. & ldquo; iptables-restore: unabletoinitializetable & #39; filter & #39; & #39; & rdquo; error. chinese translation: iptables recovery: Unable to initialize the table & ldquo; filter & rdquo ;.
If you partially execute the yum update upgrade or compile the Linux kernel, after the upgrade is completed, the "iptables-restore: unable to initialize table 'filter'" error will occur when you restart or start iptables, iptables recovery: Unable to initialize the table "filter ".
The detailed error is as follows:
Applying iptables firewall rules: FATAL: Could not open 'kernel/net/ipv4/netfilter/ip_tables.ko': No such file or directoryiptables-restore v1.4.9: iptables-restore: unable to initialize table 'filter'Error occurred at line: 1Try `iptables-restore -h' or 'iptables-restore --help' for more information.
This is because the system module of iptables is upgraded during Kernel upgrade. The latest module is not loaded, so we can try the following solutions.
1. try to directly load the module
modprobe ip_tablesmodprobe iptable_filter
Manually load the ip_tables and iptables_filter modules. If no error is displayed, it indicates that the module loading is normal. Simply restart iptables.
If the following error is prompted (for example), perform the following operations:
2. check whether iptables-related modules exist in the current kernel.
ls -al /lib/modules/`uname -r`/kernel/net/ipv4/netfilter
Run the above command by using SSH and output the following results:
If the output result contains the content shown in the above two red boxes, it indicates that there are related modules in the system, but it may not be loaded and needs to be manually loaded. If no content is shown in the box, recompile the kernel.
depmod -a
After loading, load the module again.
modprobe ip_tablesmodprobe iptable_filter
Run the preceding commands by using SSH, re-analyze and load the module, execute the command, and try to start iptables. if so, the startup is successful.
3. a kernel re-compilation method is provided.
Cd/usr/src/linux # enter the source code directory make install # for installation