Search code examples
ftplamp

how to FTP between two remote Servers on separate networks


I have read similar posts with no obvious solution. We have three servers - 3 separate physical locations / 3 separate networks. we want to copy files from one server (source) to the other two servers and vise versa. We can Ftp to server successfully from local machines, but we are not able to FTP from server to server. We're on LAMP & use IP tables and assume there is something related to that blocking access from the server to make the connection(s), but my knowledge is very limited in that area. If anyone has any suggestions as to a general set of steps or troubleshoots to check, it would be appreciated. Thanks!


Solution

  • If you can access the (3) servers from your local computer, it is probably an issue in your server trying to reach the outside world. I would say you are missing an "OUTPUT" line in your iptable which allows output flow, something like:

    iptables -A OUTPUT -p tcp --dport 21 -m state --state NEW,ESTABLISHED -j ACCEPT