iptable_nat module is not in the kernel

Hey!

Trying to set up “ap-hotspot” on osmc.
However iptable_nat module is not in the kernel.
$iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERAD
“iptables v1.4.21: can not initialize iptables table `nat ': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.”

Can I get the module iptable_nat in the next version ??

Some info.
$ls -alh /lib/modules/3.18.5-2-osmc/kernel/net/ipv4/netfilter/
drwxr-xr-x 2 root root 4,0K jan 1 1970 .
drwxr-xr-x 3 root root 4,0K mar 5 09:02 …
-rw-r–r-- 1 root root 5,9K feb 1 20:50 arptable_filter.ko
-rw-r–r-- 1 root root 23K feb 1 20:50 arp_tables.ko
-rw-r–r-- 1 root root 5,1K feb 1 20:50 arpt_mangle.ko
-rw-r–r-- 1 root root 6,4K feb 1 20:50 iptable_filter.ko
-rw-r–r-- 1 root root 6,3K feb 1 20:50 iptable_mangle.ko
-rw-r–r-- 1 root root 5,8K feb 1 20:50 iptable_raw.ko
-rw-r–r-- 1 root root 24K feb 1 20:50 ip_tables.ko
-rw-r–r-- 1 root root 4,8K feb 1 20:50 ipt_ah.ko
-rw-r–r-- 1 root root 6,0K feb 1 20:50 ipt_ECN.ko
-rw-r–r-- 1 root root 5,6K feb 1 20:50 ipt_REJECT.ko
-rw-r–r-- 1 root root 28K feb 1 20:50 nf_conntrack_ipv4.ko
-rw-r–r-- 1 root root 5,9K feb 1 20:50 nf_defrag_ipv4.ko
-rw-r–r-- 1 root root 9,9K feb 1 20:50 nf_log_ipv4.ko
-rw-r–r-- 1 root root 16K feb 1 20:50 nf_nat_h323.ko
-rw-r–r-- 1 root root 14K feb 1 20:50 nf_nat_ipv4.ko
-rw-r–r-- 1 root root 7,5K feb 1 20:50 nf_nat_pptp.ko
-rw-r–r-- 1 root root 6,1K feb 1 20:50 nf_nat_proto_gre.ko
-rw-r–r-- 1 root root 16K feb 1 20:50 nf_nat_snmp_basic.ko
-rw-r–r-- 1 root root 7,1K feb 1 20:50 nf_reject_ipv4.ko

$ uname -a
Linux osmc 3.18.5-2-osmc # 1 preempt the Sun on Feb 1 18:32:16 UTC 2015 armv6l GNU / Linux
Raspberry Pi Model B 1 +

bberski

I have made a note of this

S

Thanks Sam!

bberski

@sam_nazarko
3.18.7-1-osmc

diff -u .config.org .config.nat
— .config.org 2015-03-05 15:12:38.945653054 +0100
+++ .config.nat 2015-03-06 14:14:37.976071856 +0100
@@ -689,13 +689,13 @@
CONFIG_NETFILTER_XT_TARGET_LED=m
CONFIG_NETFILTER_XT_TARGET_LOG=m
CONFIG_NETFILTER_XT_TARGET_MARK=m
-# CONFIG_NETFILTER_XT_NAT is not set
-# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set
+CONFIG_NETFILTER_XT_NAT=m
+CONFIG_NETFILTER_XT_TARGET_NETMAP=m
CONFIG_NETFILTER_XT_TARGET_NFLOG=m
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
CONFIG_NETFILTER_XT_TARGET_RATEEST=m
-# CONFIG_NETFILTER_XT_TARGET_REDIRECT is not set
+CONFIG_NETFILTER_XT_TARGET_REDIRECT=m
CONFIG_NETFILTER_XT_TARGET_TEE=m
CONFIG_NETFILTER_XT_TARGET_TPROXY=m
CONFIG_NETFILTER_XT_TARGET_TRACE=m
@@ -820,7 +820,7 @@
CONFIG_NF_LOG_IPV4=m
CONFIG_NF_REJECT_IPV4=m
CONFIG_NF_NAT_IPV4=m
-# CONFIG_NF_NAT_MASQUERADE_IPV4 is not set
+CONFIG_NF_NAT_MASQUERADE_IPV4=m
CONFIG_NF_NAT_SNMP_BASIC=m
CONFIG_NF_NAT_PROTO_GRE=m
CONFIG_NF_NAT_PPTP=m
@@ -833,7 +833,10 @@
CONFIG_IP_NF_FILTER=m
CONFIG_IP_NF_TARGET_REJECT=m

CONFIG_IP_NF_TARGET_SYNPROXY is not set

-# CONFIG_IP_NF_NAT is not set
+CONFIG_IP_NF_NAT=m
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
CONFIG_IP_NF_MANGLE=m

CONFIG_IP_NF_TARGET_CLUSTERIP is not set

CONFIG_IP_NF_TARGET_ECN=m

bberski

1 Like

As requested, this made it in to the next release which will be out shortly

Thanks @sam_nazarko !

bberski