On 1/23/06, Rajendra Rait rajendra.rait@gmail.com wrote:
Hi Friends,
I have a debian system with 2 NIC's one with a public ip and another with a private ip, also i have a domain which is been pointed to the public ip address of this debian system.
What would happen is anyone on the net would ftp to the domain and reach this public IP.
Now what i want is to divert all ftp traffic comming to this public ip to anoher machine with a private ip address.
Someone said me that is possible through IPtables, but i don't know how to do it, i tried a lot but was not successfull, please if anyone is aware of this stuff, let me know. Regards,
Rajendra Rait.
iptables -t nat -A PREROUTING -p tcp -d <external ip> --dport 63123 -j DNAT --to <internal-ip>:80 this command to redirect http port
to understand it man iptables
you can create your own for FTP port 20 and 21
may be u need to connect your forwarded ftp with passive connection,
-- ------------------------------------------------------------------------------- AbhiSawa