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


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