I'm trying to use iptables nat rules but getting
root@OpenWrt:/tmp# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables v1.8.7 (legacy): can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
root@OpenWrt:/tmp# iptables -t nat -L
iptables v1.8.7 (legacy): can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
I've added various modules when building but not sure if i have the right one?
iptables-zz-legacy
kmod-ipt-nat kmod-ipt-nat-extra
iptables-mod-conntrack-extra
iptables-mod-extra
root@OpenWrt:/tmp# insmod ipt-nat
Failed to find ipt-nat. Maybe it is a built in module ?
root@OpenWrt:/tmp# lsmod |grep nat
nf_conntrack 81920 16 xt_connlimit,nf_conncount,xt_state,xt_helper,xt_conntrack,xt_connmark,xt_connbytes,xt_CT,nft_redir,nft_nat,nft_masq,nft_flow_offload,nft_ct,nf_nat,nf_flow_table,nf_conntrack_netlink
nf_nat 32768 4 nft_redir,nft_nat,nft_masq,nft_chain_nat
nf_tables 163840193 nft_fib_inet,nf_flow_table_ipv6,nf_flow_table_ipv4,nf_flow_table_inet,nft_reject_ipv6,nft_reject_ipv4,nft_reject_inet,nft_reject,nft_redir,nft_quota,nft_objref,nft_numgen,nft_nat,nft_masq,nft_log,nft_limit,nft_hash,nft_flow_offload,nft_fib_ipv6,nft_fib_ipv4,nft_fib,nft_ct,nft_counter,nft_chain_nat
nft_chain_nat 16384 2
nft_nat 16384 0
root@OpenWrt:/tmp# lsmod |grep iptable
ip_tables 20480 3 iptable_raw,iptable_mangle,iptable_filter
iptable_filter 16384 0
iptable_mangle 16384 0
iptable_raw 16384 0
x_tables 24576 37 xt_connlimit,xt_state,xt_helper,xt_conntrack,xt_connmark,xt_connbytes,xt_CT,iptable_raw,iptable_mangle,iptable_filter,ipt_REJECT,ipt_ECN,ip_tables,xt_time,xt_tcpudp,xt_tcpmss,xt_statistic,xt_recent,xt_quota,xt_pkttype,xt_owner,xt_multiport,xt_mark,xt_mac,xt_limit,xt_length,xt_hl,xt_ecn,xt_dscp,xt_comment,xt_cgroup,xt_addrtype,xt_TCPMSS,xt_LOG,xt_HL,xt_DSCP,xt_CLASSIFY