• H
    IPVS: make FTP work with full NAT support · 7f1c4075
    Hannes Eder 提交于
    Use nf_conntrack/nf_nat code to do the packet mangling and the TCP
    sequence adjusting.  The function 'ip_vs_skb_replace' is now dead
    code, so it is removed.
    
    To SNAT FTP, use something like:
    
    % iptables -t nat -A POSTROUTING -m ipvs --vaddr 192.168.100.30/32 \
        --vport 21 -j SNAT --to-source 192.168.10.10
    and for the data connections in passive mode:
    
    % iptables -t nat -A POSTROUTING -m ipvs --vaddr 192.168.100.30/32 \
        --vportctl 21 -j SNAT --to-source 192.168.10.10
    using '-m state --state RELATED' would also works.
    
    Make sure the kernel modules ip_vs_ftp, nf_conntrack_ftp, and
    nf_nat_ftp are loaded.
    
    [ up-port and minor fixes by Simon Horman <horms@verge.net.au> ]
    Signed-off-by: NHannes Eder <heder@google.com>
    Signed-off-by: NSimon Horman <horms@verge.net.au>
    Signed-off-by: NPatrick McHardy <kaber@trash.net>
    7f1c4075
ip_vs.h 27.4 KB