Iptables REDIRECT --to-ports not working

Hello, I currently have my CoreElec device as an internet access point using the native tethered-internet sharing capability running.

I’m trying to forward all connections to a proxy server but when trying to apply the iptables rules I’m getting the below.

Does anyone know what is causing this?

CoreELEC:~ # iptables -t nat -I PREROUTING  -p tcp --dport 80 -j REDIRECT --to-port 8080
iptables: No chain/target/match by that name.

for reference:

CoreELEC:~ #  iptables -t nat -S
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
-N DOCKER
-N connman-POSTROUTING
-A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
-A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
-A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE
-A POSTROUTING -j connman-POSTROUTING
-A DOCKER -i docker0 -j RETURN
-A connman-POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE

I previously in my machinations managed to get a different result saying Iptables doesn’t recognize --to-ports

Any thoughts?

Maybe this is missing in kernel config?

Is there a formal way of updating the config file eg in a Buildroot style mechanism? Or is it manual with an editor? As I am unsure as to weather I should be marking the CONFIG_NF_NAT_REDIRECT as ‘y’ or ‘m’

Thank you,

missing modules (collected for my needs)
kernel-overlays.tar.gz (10.0 KB)

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.