2

I have two ARM devices connected to each other with TCP/IP, one of them is connected to my network, on the other one is FTP server.
I'm trying to set up port forwarding to ftp using conntrack and helper:

## raw
iptables -t raw -A PREROUTING -p tcp -m tcp --dport 21 -j CT --helper ftp
## filter
iptables -A FORWARD -d 192.168.201.1/32 -p tcp -m tcp --dport 21 -j ACCEPT
## nat
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 21 -j DNAT --to-destination 192.168.201.1:21
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

# cat /proc/sys/net/netfilter/nf_conntrack_helper
0
# cat /proc/sys/net/ipv4/ip_forward
1

# lsmod
Module                  Size  Used by
nf_nat_ftp              1839  0
nf_conntrack_ftp        6534  2 nf_nat_ftp
xt_CT                   3205  1
iptable_raw             1510  1
xt_conntrack            2886  0
iptable_filter          1808  1
ipt_MASQUERADE          1102  1
nf_nat_masquerade_ipv4     2734  1 ipt_MASQUERADE
xt_nat                  1671  1
xt_tcpudp               2137  3
iptable_nat             1803  1
nf_conntrack_ipv4       6580  2
nf_defrag_ipv4          1435  1 nf_conntrack_ipv4
nf_nat_ipv4             5261  1 iptable_nat
nf_nat                 15612  4 xt_nat,nf_nat_ftp,nf_nat_masquerade_ipv4,nf_nat_ipv4
nf_conntrack           76225  8 nf_conntrack_ftp,nf_conntrack_ipv4,nf_nat_ftp,xt_CT,nf_nat_masquerade_ipv4,xt_conntrack,nf_nat_ipv4,nf_nat
ip_tables              11523  3 iptable_filter,iptable_raw,iptable_nat
x_tables               18629  8 xt_nat,ip_tables,iptable_filter,xt_tcpudp,iptable_raw,ipt_MASQUERADE,xt_CT,xt_conntrack

This setup works on desktop systems, but doesn't work on my compilation of linux (ti-linux-kernel 4.9.50)

My question is: are there any modules I'm missing here?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.