SNATTING FTP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, 
i wanted to do SNAT on FTP connections which are destined from my local 
network to outside network. I tried the SNAT for ssh and it was working with 
the following rule
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 <http://192.168.1.0/24> -p 
tcp -m tcp --dport 22 -m state --state NEW -j SNAT --to
192.168.1.5<http://192.168.1.5>

I tried the following rules for FTP but it is no working

iptables -t nat -A POSTROUTING -s 192.168.1.0/24 <http://192.168.1.0/24> -p 
tcp -m tcp --dport ftp -m state --state NEW,ESTABLISHED,RELATED -j SNAT --to 
192.168.1.5 <http://192.168.1.5>

iptables -t nat -A POSTROUTING -s 192.168.1.0/24 <http://192.168.1.0/24> -p 
tcp -m tcp --sport ftp-data -m state --state NEW,ESTABLISHED,RELATED -j SNAT 
--to 192.168.1.5 <http://192.168.1.5>

Can someone assist me in this situation.
Thanks


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux