I have one machine with an public ip and a testserver(IP 10.10.6.4) on my network. To this testserver I need ftp connections from outside my lan on port 8121 (Zope ftp instance). Both machines runs debian etch.
I don't care about what software to use, as long as it is opensource. My research leeds to Iptables, but any suggestions to others are welcome.
When opening a ftp connection on local machine everything works perfekt!
I tried to configure iptables but ftp hangs after succesfull connection. I used following commands (remark SERVER is an alias):
# iptables -A FORWARD -i eth3 -p tcp --dport 8121 -d 10.10.6.4 -j ACCEPT
# iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE
# iptables -t nat -A PREROUTING -p tcp -d SERVER --dport 21 -j DNAT --to 10.10.6.4:8121
My ftp connection:
# ftp SERVER 21
Connected to yellow.headnet.dk.
220 0.0.0.0 FTP server (Medusa Async V41297 [experimental]) ready.
Name (yellow.headnet.dk:dacz): USER
331 Password required.
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
200 PORT command successful.
150 Opening ASCII mode data connection for file list
And then it hangs.
Does the ftp protocol use a port range er anything else than just current choosen 8121???
Does anyone have a suggstion to a solution?
Best regards and thanks!