1

I need to install some iptable ruels to block traffic that originates from a certain country, I found this script example on http://www.cyberciti.biz/faq/block-entier-country-using-iptables/ it works great on another host I have but on this one (an embedded box) I get:

./iptable_rules.sh 
modprobe: module ip_tables not found in modules.dep
iptables v1.4.16.3: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

Now upgrading the kernel due to the nature of the device, is not an option. Does anyone know a way I can get around this? This system running on kernel 3.2.34

  • Are you running the script (and thus iptables itself) as root or as a normal user? It will complain about many similar things if you are not running it as root. – Bytor Aug 8 '15 at 21:18
  • @bytor I'm running it as root, must be something else... – cerr Aug 8 '15 at 21:36
  • 1
    try lsmod | grep ip , what do you get ? – neuron Aug 8 '15 at 22:01
  • 1
    modprobe ip_tables; modprobe ip_conntrack; modprobe iptable_filter; modprobe ipt_state. If the modules are not loaded after this then you will have to do as @Gilles said – neuron Aug 8 '15 at 22:12
  • 1
    Try following this article – neuron Aug 8 '15 at 23:50
1

You should be able to re-compile it using something to the similar commands.

make KERNEL_DIR=/usr/src/linux
make install KERNEL_DIR=/usr/src/linux

make dep
make bzIamge
make
make install
make modules

Source: iptables: Table does not exist (do you need to insmod?)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.