We have problems with newer versions of the firmware of the RUT955 devices.
What we do is use an iptables plugin called iprange, to block all then allow a specific range to go through. This has worked for years without any issues.
With the 06.07.5 firmware it still works, but with the 06.07.7 firmware and later it doesn't work anymore. I suspect this is a bug in iptables that found it's way into the firmware.
Let me show you what we do.
We first need to install the iprange module for iptables.
roo[email protected]:~# opkg install iptables-mod-iprange --force-depends
Installing iptables-mod-iprange (1.4.21-1) to root...
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/base/ipt
ables-mod-iprange_1.4.21-1_ar71xx.ipk.
Multiple packages (kmod-ipt-core and kmod-ipt-core) providing same name marked HOLD or PREFER.
Using latest.
Installing kmod-ipt-iprange (3.18.23-1) to root...
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/base/kmo
d-ipt-iprange_3.18.23-1_ar71xx.ipk.
Configuring kmod-ipt-iprange.
sed: xt_iprange: No such file or directory
Configuring iptables-mod-iprange.
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for iptables-mod-iprange:
* kernel (= 3.18.23-1-b2f200610f46d20ef52d269421369d0c) *
[email protected]:~# opkg install iptables-mod-iprange
Package iptables-mod-iprange (1.4.21-1) installed in root is up to date.
Now we move the xt_iprange.ko file to the folder containing the current kernel version:
r[email protected]:/lib/modules/3.18.23# mv xt_iprange.ko ../3.18.44/
No we can insert the module.
[email protected]:/lib/modules/3.18.23# insmod /lib/modules/3.18.44/xt_iprange.ko
Now we try to install the iptables rule containing iprange.
[email protected]:/lib/modules/3.18.23# iptables -I FORWARD -m iprange --src-range 10.10.202.170-
10.10.202.190 -j ACCEPT
/usr/lib/iptables/libxt_iprange.so: File not found
iptables v1.6.2: Couldn't load match `iprange':No such file or directory
Try `iptables -h' or 'iptables --help' for more information.
When you check that folder, the file does exist. Both 06.07.5 and 06.07.7 both use the same kernel version, but .5 works properly and .7 doesn't. We also tried an even newer version, 06-08.1 which has the same issue.