Quote:
The reason why the port is random is because your in FTP passive mode.
|
This isn't quite correct. The way servers work is that you send the request on port xx but then the server talks to your client and negotiates a port at a higher number.
I believe that your router iptables script is the problem.
I use the following lines to do what you are doing.
INTERNALNET="192.168.168.0/24"
EXT_IFACE1="eth1"
EXTERNAL=`ifconfig $EXT_IFACE1 | grep "inet addr:" | \awk -F: {'print $2'} | cut -d\ -f 1`
# This line tells INTERNALNET to use $EXTERNAL IP address
$IPT -t nat -I POSTROUTING -s $INTERNALNET -j SNAT --to $EXTERNAL
iptables -I INPUT -p ALL -i eth0 -s 192.168.168/24 -j ACCEPT
iptables -I OUTPUT -p ALL -s 192.168.168/24 -j ACCEPT
iptables -I FORWARD -i eth0 -d 0/0 -p all -j ACCEPT
If you would like to see the rest of my firewall script I would be happy to share it with you but it is a little large to post here.
email me at
bbenz3@hotmail.com