Similar questions have been asked before, but I can't find any additional information or a situation like mine. I have a linux SBC with 2 network connections. One is an Ethernet-over-USB connection to an industrial vision system. To allow the factory software to work from the external network, I setup iptables to do NAT on the necessary ports for the software to work. However, I've run into some trouble with the FTP portion of this connection. Using ip_nat_ftp and ip_conntrack I was able to get Active FTP to work, but Passive FTP does not (Hangs on the LIST command).
I believe the problem is the PASV response returning the camera's local IP address, not the external one the software needs. I think the usual solution is to just configure your FTP server to reply with the external address, but I can't make any changes to the off-the-shelf device. Is there a way to get iptables to 'see' this string and re-write it with the correct IP? I thought ip_nat_ftp parsed the command strings and would be capable of this.