I have started using iptable and have working examples with input and output and masquerading. However I do not understand how to get FORWARD to work in the script below.

It seems to ignore all references to FORWARD. I get log messages for input starting and output starting but no log messages for forward; and no packets are forwarded.

IPTABLES=iptables
EXTIF="eth0"
INTIF="wlan0"
echo " External Interface: $EXTIF"
echo " Internal Interface: $INTIF"
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/ip_dynaddr


$IPTABLES -t filter -F
$IPTABLES -t nat -F
$IPTABLES -P INPUT ACCEPT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT

$IPTABLES -I FORWARD -j LOG --log-prefix 'forward rules start *******'
$IPTABLES -I INPUT -j LOG --log-prefix 'input rules start *******'
$IPTABLES -I OUTPUT -j LOG --log-prefix 'output rules start *******'

$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j LOG --log-prefix 'accepted inbound**********'
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT

$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j LOG --log-prefix 'accepted outbound**********'
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT

$IPTABLES -A FORWARD -j LOG --log-prefix 'dropped **********'

$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE

echo "*** completed ***"