ERROR: could not insert 'iptable_nat': Exec format error

Yoppie

New Member
Mar 17, 2014
5
0
1
I just got a new dedicated server with proxmox installed.
Code:
# pveversion
pve-manager/3.4-3/2fc72fee (running kernel: 2.6.32-37-pve)
But it seems the nat module is not loaded:
Code:
# iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o vmbr1 -j MASQUERADE
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 tried to load it but I'm getting the following errors:
Code:
# modprobe iptable_nat
ERROR: could not insert 'iptable_nat': Exec format error
Code:
# insmod /lib/modules/2.6.32-37-pve/kernel/net/ipv4/netfilter/iptable_nat.ko
Error: could not insert module /lib/modules/2.6.32-37-pve/kernel/net/ipv4/netfilter/iptable_nat.ko: Invalid module format

Do you have any idea what's wrong and how I can fix it?
 
I just got a new dedicated server with proxmox installed.
Code:
# pveversion
pve-manager/3.4-3/2fc72fee (running kernel: 2.6.32-37-pve)

Code:
# insmod /lib/modules/2.6.32-37-pve/kernel/net/ipv4/netfilter/iptable_nat.ko
Error: could not insert module /lib/modules/2.6.32-37-pve/kernel/net/ipv4/netfilter/iptable_nat.ko: Invalid module format

Do you have any idea what's wrong and how I can fix it?

Did you make recently a kernel upgrade without reboot afterwards? If so reboot the system!

Check also the file data by

Code:
ls -l /lib/modules/2.6.32-37-pve/kernel/net/ipv4/netfilter/iptable_nat.ko

should result

Code:
-rw-r--r-- 1 root root 15888 Mar 18 08:29 /lib/modules/2.6.32-37-pve/kernel/net/ipv4/netfilter/iptable_nat.ko

A system upgrade is useful in any case.
 
Code:
# ls -l /lib/modules/2.6.32-37-pve/kernel/net/ipv4/netfilter/iptable_nat.ko
-rw-r--r-- 1 root root 15888 Mar 18 08:29 /lib/modules/2.6.32-37-pve/kernel/net/ipv4/netfilter/iptable_nat.ko

I will try rebooting.
 
Rebooting worked. Thanks for pointing me in the right direction.

It's surprising because I hadn't touched the server since it was delivered by my hosting provider but anyway. It works now.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!