ftp Redirect problems using RDR

Nicolás de Bari Embríz G. R. nbari at unixmexico.com
Mon Feb 23 16:44:17 PST 2004


Hi all.

I am having some problems redirecting a ftp using rrd, i am using ipfilter
and ipnat

my ipnat.rules on Server 1 file has some thing like:

map fxp0 192.168.50.1/24 -> 148.243.246.2/32 portmap tcp/udp auto
map fxp0 192.168.50.1/24 -> 148.243.246.2/32
rdr fxp0 148.243.246.2/32 port 21 -> 192.168.60.1/32 port 21024

My net is something like:


  server 1                              server 2
148.243.246.2                         200.50.59.30
  ---------                         ---------------------------
 | FreBSD  | <----IPSEC tunnel---> |  FTP (pureftp port 11021) |
  ---------                         ---------------------------
 192.168.50.1                        192.168.60.1
     |                                     |
     |                                     |
   -----                                 -----
  | NAT |                               | NAT |
   -----                                 -----
     |                                     |
192.168.50.0/24                    192.168.60.0/24



I want to redirect ftp connections on server 1 (port 21) to server 2 (port
11021) so when a user, ftp to 148.243.246.2 he gets redirected to server
200.50.59.30, but using the IPSEC tunnel.

ftp 148.243.246.2 port 21 ----> redirect to 192.168.60.1 port 11021

right now the IPSEC tunnel works fine i can ping an see machines from
192.168.50.0/24 to 192.168.60.0/24

Any idea on how could i fix this ?

both servers are using FreeBSD 4.9-STABLE





-- 
nbari at unixmexico.com
key ID 1EF56FDC


More information about the freebsd-net mailing list