<br><br><div><span class="gmail_quote">On 10/5/07, <b class="gmail_sendername">Feizhou</b> <<a href="mailto:feizhou@graffiti.net">feizhou@graffiti.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>> Do you have ip_nat_ftp loaded too?<br>><br>><br>> YES, both ip_conntrack_ftp and ip_nat_ftp.<br>> pls see below<br>><br>> #Enable tracking mechanism<br>> /sbin/modprobe -a ip_conntrack_ftp ip_nat_ftp
<br><br>Hmm, I think the NEW for port 1024: is not necessary in FORWARD then.<br>The nat_ftp should handle it and thus make it ESTABLISHED,RELATED and<br>the ESTABLISHED,RELATED rule should therefore be sufficient.<br></blockquote>
</div><br>That meas I do not nedd below rule i FORWARD chain. <br><br>iptables -A FORWARD -p tcp -d
<a href="http://192.168.100.3/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">192.168.100.3</a> --dport 1024: -m state --state NEW -j ACCEPT
<br><br><br>So below 3 rules will be enough. <br><br><br>iptables -t nat -A PREROUTING -p tcp -i eth0 -d <a href="http://1.2.3.4/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
1.2.3.4</a> --dport 21 -j DNAT --to-destination <a href="http://192.168.100.3:21/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">192.168.100.3:21
</a><br>iptables -t nat -A PREROUTING -p tcp -i eth0 -d <a href="http://1.2.3.4/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">1.2.3.4</a> --dport 1024: -j DNAT --to-destination <a href="http://192.168.100.3/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
192.168.100.3</a><br><br>iptables -A FORWARD -p tcp -d <a href="http://192.168.100.3/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">192.168.100.3</a> --dport 21 -m state --state NEW -j ACCEPT<br>
<br><br><br><br>-- <br>Thank you<br>Indunil Jayasooriya<br>