Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I was wondering if anyone knew of a reverse proxy server to reverse proxy ftp traffic. I would like to run many servers on ip address, but then pass the traffic to an internal server with its own ip address. Thank you for any suggestions.

share|improve this question
    
Okay, I have a dedicated Linux machine providing firewall and routing to my whole network. I have several public ip addresses and I am doing a 1 to 1 port NAT for public servers behind the firewall. However, now I need to put several applications in their own virtual servers, but I am trying to avoid having to add a public ip address for each virtual machine. There are several web servers that provide a reverse proxy for web traffic. However, I am trying to figure out how to provide file editing capabilities as well. I am open to webdav or ftp, but most users prefer ftp. –  TonyZ Mar 15 '10 at 16:24
add comment

3 Answers

up vote 0 down vote accepted

There are several ways to solve this problem. I like this setup:

                      +-------------+  
                      |  Gateway    |
                      |  NAT/Router |
                      |  216...     | 
                      +--+---+------+
                         |   |  
         +-- FTP ports --+   |       
         |                   |               
         |               Web ports
         |                   | 
    +----+--------+     +----+---------+    
    |  VM2 - FTP  |     |  VM1 - web   |    
    |  192...2    |     |  192...1     |      
    |  mounts     |     |  mounts      |    
    |   /www      |     |   /www       |    
    +-------------+     +--+--------+--+              
                           |        |                       
                     dom1 app proxy |                          
                           |        |
                           |  dom2 app proxy
                           |        |
                           |        |
                 +---------+---+ +--+----------+
                 |  VM3 - dom1 | |  VM4 - dom2 |
                 |  192...3    | |  192...4    |                 
                 |  mounts     | |  mounts     |
                 |  /www/dom1  | |  /www/dom2  |
                 +-------------+ +-------------+                                    

The idea is that the gateway uses NAT and port-forwards the web and ftp requests to their respective VM's. The Web and FTP VM's use virtualhosts to manage the specific subfolders of /www based on requested domain. Then the web server proxies the dynamic content requests back the per-domain application VM's which only have access to their own sub-directory. There is also no reason you can't have the web server serving WebDAV as well.

share|improve this answer
add comment

We currently use JFTPGW - http://www.mcknight.de/jftpgw/

It has worked very well for us so far.

Here's the relevant section from my jftpgw config:

<global>
forward *@192.168.0.xx
reverselookups  yes
syslogfacility  daemon
commandtimeout 300
transparent-proxy   off
forwardlookups  yes
dnslookups  no
share|improve this answer
    
Thank you for the answer, but I did not see where that will function as a reverse proxy. It was interesting though. –  TonyZ Mar 16 '10 at 13:56
    
I've updated my answer with my config. Have your DNS record and firewall direct FTP traffic to your reverse proxy. Then have the forward command in the config point to your internal FTP server. –  Jeff Miles Mar 16 '10 at 17:25
    
Thanks! Appreciate it. I will try that out. –  TonyZ Mar 17 '10 at 14:14
add comment

Why is a reverse proxy necessary? Have you considered using a Destination NAT? (DNAT)

Edit 1

If you run Linux, depending on your infrastructure, you should be able to configure NATs on your server. Your Linux server would have to be routing the traffic on the Internet routable IP to an internal network for this to be a functional solution.

If this is not helpful, you will need to provide additional details regarding your infrastructure for a more specific recommendation.

Linux NAT HOWTO

Edit 2

Network Address Translation will do what you describe. Either by specifying different ports or configuring virtual hosts in your FTP daemon, which most modern daemons support.

share|improve this answer
    
I am using Linux, but I am not familiar with DNAT. Will have to check into that, but can that mimic virtual hosting? I want to point say ten domain names to the same ip address, but NAT them to separate internal ip addresses. Thanks! –  TonyZ Mar 15 '10 at 15:15
    
Okay, I have a dedicated Linux machine providing firewall and routing to my whole network. I have several public ip addresses and I am doing a 1 to 1 port NAT for public servers behind the firewall. However, now I need to put several applications in their own virtual servers, but I am trying to avoid having to add a public ip address for each virtual machine. There are several web servers that provide a reverse proxy for web traffic. However, I am trying to figure out how to provide file editing capabilities as well. I am open to webdav or ftp, but most users prefer ftp. –  TonyZ Mar 15 '10 at 15:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.