SSH Port Forwarding Passive FTP

Posted on May 6, 2008

Initialize ssh port forwarding of FTP

#modprobe ip_conntrack

#modprobe ip_conntrack_ftp

#modprobe ip_nat_ftp

#echo 1 > /proc/sys/net/ipv4/ip_forward

Iptables port forwarding rules

iptables -t nat -A PREROUTING -p tcp --dport 21 -i <server's-ethernet> -j DNAT --to <remote-server-ip>:21
iptables -t nat -A POSTROUTING -p tcp -d <remote-server-ip> --dport 21 -j SNAT --to-source <server's-ip>

» Filed Under Linux/Nix

Comments

Leave a Reply




*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-spam image

  • Recent Comments

    • krusna: the file SUNWrge.tar.gz is not found on that URL....
    • Gugi: The file SUNWrge.tar.gz is not found on the url you gave abo...
    • Robert: how can i take a slot in your blog-rolls? here's mind htt...
    • rachel Perez: that's mine, mine, mine, mine... hehe.. thanks po......
    • Malyn Torne: gada voice nya at ang humble nya para sa mga tao..keep up th...

Directory of Personal Blogs
Technology Blogs - BlogCatalog Blog Directory Personal - Top Blogs Philippines