LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   can't initialize iptables table `filter' (https://www.linuxquestions.org/questions/linux-networking-3/cant-initialize-iptables-table-%60filter-877800/)

mahmoodn 04-29-2011 05:26 AM

can't initialize iptables table `filter'
 
On my diskless cluster, I want to open a port on the image that nodes use it.

Here is what I get:
Code:

root@server:~# chroot /home/nfsroot/
root@server:/# iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 4949  -j ACCEPT
iptables v1.4.4: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
root@server:/# uname -a
Linux server 2.6.32-24-server #39-Ubuntu SMP Wed Jul 28 06:21:40 UTC 2010 x86_64 GNU/Linux
root@server:/#

First I chroot to /home/nfsroot where I installed the ubuntu image for nodes. Any suggestion on that?

smallpond 04-29-2011 07:00 PM

Quote:

Originally Posted by mahmoodn (Post 4340439)
On my diskless cluster, I want to open a port on the image that nodes use it.

Here is what I get:
Code:

root@server:~# chroot /home/nfsroot/
root@server:/# iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 4949  -j ACCEPT
iptables v1.4.4: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
root@server:/# uname -a
Linux server 2.6.32-24-server #39-Ubuntu SMP Wed Jul 28 06:21:40 UTC 2010 x86_64 GNU/Linux
root@server:/#

First I chroot to /home/nfsroot where I installed the ubuntu image for nodes. Any suggestion on that?


grep IPTABLES /boot/config-`uname -r`
should print:
Code:

CONFIG_IP_NF_IPTABLES=y
If it is m, then you need to load the iptables module.
Do lsmod to see what's loaded.

mahmoodn 04-30-2011 12:00 AM

Code:

mahmood@orca:~$ grep IPTABLES /boot/config-`uname -r`
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP6_NF_IPTABLES=m

using lsmod, there is no iptables module. What should I do next?

smallpond 04-30-2011 12:29 AM

[QUOTE=mahmoodn;4341571]
Code:

CONFIG_IP_NF_IPTABLES=m
"m" means it is compiled as a module, not compiled into the kernel.
To load try:

service iptables restart

If that doesn't work you can load the modules manually:

modprobe iptables
modprobe iptable_filter

Not sure of the exact names. They are in the /lib/modules/*/kernel/net/ subdirectory for your kernel.

mahmoodn 04-30-2011 12:36 AM

/lib/modules is empty. That means there is no kernel installed for the nodes!!
It is strange because the client can boot from that image and I can see the login prompt and then login.

smallpond 04-30-2011 01:02 AM

Quote:

Originally Posted by mahmoodn (Post 4341596)
/lib/modules is empty. That means there is no kernel installed for the nodes!!
It is strange because the client can boot from that image and I can see the login prompt and then login.

The kernel itself is in /boot. But your install is broken if you don't have the modules.

mahmoodn 04-30-2011 01:06 AM

/boot is also empty !!
I have installed the boot image using
Code:

debootstrap --arch amd64 lucid /home/nfsroot/ http://archive.ubuntu.com/ubuntu/
/home/nfsroot is shared with nfs. I used this guide https://wiki.edubuntu.org/EasyUbuntu...edClusterGuide

When I say /boot and /lib/modules are empty I mean /home/nfsroot/boot and /home/nfsroot/lib/modules are empty. I am not talking about the server node

smallpond 04-30-2011 01:24 AM

Quote:

Originally Posted by mahmoodn (Post 4341614)
/boot is also empty !!
I have installed the boot image using
Code:

debootstrap --arch amd64 lucid /home/nfsroot/ http://archive.ubuntu.com/ubuntu/
/home/nfsroot is shared with nfs. I used this guide https://wiki.edubuntu.org/EasyUbuntu...edClusterGuide

When I say /boot and /lib/modules are empty I mean /home/nfsroot/boot and /home/nfsroot/lib/modules are empty. I am not talking about the server node

Cool! OK - it loaded the kernel using tftp from your server. It looks like it also has loads a filesystem from the server with the rest of the OS. This is probably where your modules need to be. Either that or recompile the kernel with "y" instead of "m".

mahmoodn 04-30-2011 01:38 AM

What should I do exaclty?

smallpond 04-30-2011 12:14 PM

Quote:

Originally Posted by mahmoodn (Post 4341636)
What should I do exaclty?

Based on the documentation I'd guess that your NFS share should have the modules in it. After the kernel is booted via PXE, it should NFS mount the rest. See what's mounted and why the modules are not in the mounted directories on the root node.

The documentation is long on building the kernel and short on setting up the rest of the system.

mahmoodn 04-30-2011 12:19 PM

I am not using Kerrighed. I used that document to setup a diskless cluster.


All times are GMT -5. The time now is 04:09 PM.