diverting ftp to non default Gateway?

Hi all,
I have a Debian etch GNU/Linux firewall/router for a classical 192.168.0.0/24 LAN connected to eth1.
eth0 (my default gateway) and it has two different static IPs.

eth0 IP n°1) 82.xx.xxx.xxx
eth0 IP n°2) 88.yy.yyy.yyy
eth1 IP n°1) 192.168.0.1

I use the 82.xx.xxx.xxx as LAN gateway (iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/24 -j SNAT --to-source 82.xx.xxx.xxx) and I use the second IP for the apache web server. All works as expected.
I'd like to hijack ftp connections coming from LAN to internet and "diverting" them from 82.xx.xxx.xxx to 88.xx.xxx.xxx.

Infact if I open a new ftp connection to (for ex.) ftp.kernel.org from LAN, iptables will forward this via IP 82.xx.xxx.xxx. I'd like to forward ftp connections via IP 88.yy.yyy.yyy leaving all other traffic (pop3, web,smtp and so on) masqueraded via IP 82.xx.xxx.xxx.

Obviously i'd like to "divert" not only the ftp-control (port 21) connection but also the ftp-data connection (>1024 port).

Thanks in advance, any help will be very appreciated.

0
Syndicate content