OpenWrt Forum Archive

Topic: iptables install

The content of this topic has been archived on 23 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hi,
i added a package iptables in the .config of may project like this:
CONFIG_PACKAGE_iptables=y

after i created a image, and i flashed it in may board, i found just a binary "iptables". when i run a :
**********************************
$iptables -L
i have this message:
modprobe: module ip_tables not found
modprobe: failed to load module ip_tables
iptables v1.3.5 : can't initialise iptables table "filter" : table does not exist (do you need to insmod?)
perhaps iptables or your kernel nedds to be upgraded

**************************************
I think , ishoud add iptables like kernel module.
i try to do this (with a configuration ok kernel menu config) but i found a extention of this module like a nat ant netfilter..
even i added  (nat ant netfilter ..)
the problem still also.

any help.
thanks in advance.

hi every body,
the problem is :
find a ipt-* .ko and the librairy .
i find a library in /usr./ib/iptables/ . but ai dont know where is the kernel module f iptables. i search :lib/modules but i didn't found them.
any idea

hi,
after i installed iptables and all thedeênce with modules of netfilter. i just found a (for examle: xt_mac.o ) and i not found a xt_mac.ko
any help.

hi,
i found the solution,
if you have the same problem, i can help you.
thanks

I am having this same problem, anyone care to help?

root@OpenWrt:~# iptables -L
iptables v1.3.8: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

here are installed packages:

root@OpenWrt:~# ipkg list_installed
base-files-adm5120 - 12-r9955 -
batmand - 0.3-alpha-rv900 -
busybox - 1.8.2-1 -
dnsmasq - 2.39-1 -
dropbear - 0.50-3 -
ethtool - 3-0 -
hotplug2 - 0.9+r102-2 -
iftop - 0.17-1 -
ip - 2.6.20-070313-1 -
iptables - 1.3.8-2 -
iptables-mod-conntrack - 1.3.8-2 -
iptables-mod-filter - 1.3.8-2 -
iptables-mod-imq - 1.3.8-2 -
iptables-mod-ipopt - 1.3.8-2 -
kernel - 2.6.23.11-adm5120-1 -
kmod-ipt-conntrack - 2.6.23.11-adm5120-1 -
kmod-ipt-filter - 2.6.23.11-adm5120-1 -
kmod-ipt-imq - 2.6.23.11-adm5120-1 -
kmod-ipt-ipopt - 2.6.23.11-adm5120-1 -
kmod-madwifi - 2.6.23.11+r3053-adm5120-1 -
kmod-sched - 2.6.23.11-adm5120-1 -
kmod-tun - 2.6.23.11-adm5120-1 -
libgcc - 4.2.2-12 -
libncurses - 5.6-1 -
libpcap - 0.9.4-1 -
libpthread - 0.9.28-10 -
mtd - 6 -
pciutils - 2.2.1-1 -
qos-scripts - 1.2.1-1 -
tc - 2.6.20-070313-1 -
uclibc - 0.9.28.2-12 -
udevtrigger - 106-1 -
wireless-tools - 29-1 -
Done.

What's the output of lsmod?

only wireless modules I'm afraid. what else should be there? I've just done ipkg install iptables and that gives me no additional modules (with or without dependencies)
root@OpenWrt:~# lsmod
Module                  Size  Used by    Tainted: P
ath_pci               114672  0
wlan_xauth               480  0
wlan_wep                3904  1
wlan_tkip               9536  0
wlan_ccmp               5248  0
wlan_acl                1856  0
ath_rate_minstrel       7840  2
ath_hal               271040  4 ath_pci,ath_rate_minstrel
wlan_scan_sta           8576  0
wlan_scan_ap            6176  0
wlan                  149056  11 ath_pci,wlan_xauth,wlan_wep,wlan_tkip,wlan_ccmp,wlan_acl,ath_rate_minstrel,wlan_scan_sta,wlan_scan_ap
imq                     1808  0
nf_conntrack_ipv4       8384  0
nf_conntrack           37552  1 nf_conntrack_ipv4
tun                     6112  1
root@OpenWrt:~#

I don't currently have access to a router running OpenWrt, but on an Ubuntu Gutsy box, I have the following modules loaded:

iptable_filter
ip_tables
x_tables

You might want some of the other ip_* and ipt_* modules, like ipt_MASQUERADE.ko.

The "nf_conntrack*" modules you have are Netfilter connection tracking modules, so you do have some of the netfilter modules at least.  Depending on what protocols you're using, you might want some of the other conntrack modules too.  e.g. nf_conntrack_ftp.ko.

Hope that helps.

The discussion might have continued from here.