RevPi connect and IPTables
Posted: 12 Sep 2019, 12:11
Good morning to everyone,
i'm just using a RevPi connect and i need to setup IPTables to perform Source NAT on eth1. The problems is that iptables kernel modules seems to be not present:
so i've attempted to modprobe the needed modules:
but when loading the iptables table modules i'm getting the following error:
and when i check the system log
i get the following entries:
at first time, it seems that modules and kernel version des not match, so i check the infos and the kernel version:
i've performed a system update, but i don't know how to solve this module mismatch..
many thanks,
Pierluigi
i'm just using a RevPi connect and i need to setup IPTables to perform Source NAT on eth1. The problems is that iptables kernel modules seems to be not present:
Code: Select all
revpi@RevPi18652:~ $ sudo iptables -L
[sudo] password for revpi:
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Code: Select all
revpi@RevPi18652:~ $ sudo modprobe ip_tables
revpi@RevPi18652:~ $ sudo modprobe x_tables
revpi@RevPi18652:~ $ lsmod
Module Size Used by
cfg80211 567555 0
rfkill 21290 2 cfg80211
snd_bcm2835 24894 0
snd_pcm 98471 1 snd_bcm2835
snd_timer 23236 1 snd_pcm
snd 69999 3 snd_timer,snd_bcm2835,snd_pcm
bcm2835_gpiomem 3900 0
ftdi_sio 33216 0
usbserial 30503 1 ftdi_sio
uio_pdrv_genirq 4045 0
uio 10369 1 uio_pdrv_genirq
spidev 7377 0
piControl 112286 0
ti_dac082s085 6064 0
mcp320x 11286 0
iio_mux 5186 0
mux_gpio 2689 0
mux_core 8238 2 mux_gpio,iio_mux
fixed 3285 0
gpio_74x164 3584 0
spi_bcm2835aux 5134 0
spi_bcm2835 9347 0
ks8851 15287 0
eeprom_93cx6 4138 1 ks8851
gpio_max3191x 9757 1 piControl
industrialio 67909 4 mcp320x,iio_mux,ti_dac082s085,piControl
crc8 1726 1 gpio_max3191x
i2c_dev 6987 0
ip_tables 13277 0
x_tables 20597 1 ip_tables
ipv6 434524 36
Code: Select all
revpi@RevPi18652:~ $ sudo modprobe iptable_filter
modprobe: ERROR: could not insert 'iptable_filter': Invalid argument
Code: Select all
dmesg
Code: Select all
[69444.875388] iptable_filter: disagrees about version of symbol xt_hook_ops_alloc
[69444.875400] iptable_filter: Unknown symbol xt_hook_ops_alloc (err -22)
[69444.875422] iptable_filter: disagrees about version of symbol ipt_alloc_initial_table
[69444.875426] iptable_filter: Unknown symbol ipt_alloc_initial_table (err -22)
[69444.875439] iptable_filter: disagrees about version of symbol ipt_do_table
[69444.875443] iptable_filter: Unknown symbol ipt_do_table (err -22)
[69444.875456] iptable_filter: disagrees about version of symbol register_pernet_subsys
[69444.875460] iptable_filter: Unknown symbol register_pernet_subsys (err -22)
[69444.875466] iptable_filter: disagrees about version of symbol init_net
[69444.875470] iptable_filter: Unknown symbol init_net (err -22)
[69444.875483] iptable_filter: disagrees about version of symbol ipt_unregister_table
[69444.875487] iptable_filter: Unknown symbol ipt_unregister_table (err -22)
[69444.875496] iptable_filter: disagrees about version of symbol unregister_pernet_subsys
[69444.875500] iptable_filter: Unknown symbol unregister_pernet_subsys (err -22)
[69444.875522] iptable_filter: disagrees about version of symbol ipt_register_table
[69444.875526] iptable_filter: Unknown symbol ipt_register_table (err -22)
Code: Select all
revpi@RevPi18652:~ $ modinfo iptable_filter
filename: /lib/modules/4.9.76-rt60-v7+/kernel/net/ipv4/netfilter/iptable_filter.ko
description: iptables filter table
author: Netfilter Core Team <coreteam@netfilter.org>
license: GPL
srcversion: CF2A37FD05317A5521C9DC1
depends: x_tables,ip_tables
intree: Y
vermagic: 4.9.76-rt60-v7+ SMP preempt mod_unload modversions ARMv7 p2v8
parm: forward:bool
revpi@RevPi18652:~ $ uname -r
4.9.76-rt60-v7+
many thanks,
Pierluigi