Question : linux router with iptables script

Dear Experts:

I have Centos 5.5 with two ethernet cards (eth0 and eth1). with the help of experts i got a iptable rule for the lan users who does not have an internet access but access the mail accounts to send or receive mails from the internet mail server.  Attached the firewall script which is recomended by the experts. I changed the entires in the for loop as per my requirement the same is posted below :
-------------------------------------Firewall script mail access for lan users section----------------------
orginal --> for((i=13;$i<26;i++))
changed to --> for((i=1;$i<30;i++))
do
    iptables -A FORWARD -p tcp -s 192.168.0.$i -d  202.137.236.12 --dport 25 -j ACCEPT
    iptables -A FORWARD -p tcp -s 192.168.0.$i -d  202.137.236.11 --dport 110 -j ACCEPT
    iptables -A FORWARD -p tcp -s 192.168.0.$i -j DROP
done
iptables -A FORWARD -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
---------------------------------------------------------------------------------------------
after executing the above modified script nat rules which was working before changing the for loop entires now the nat rules  stopped  and no internet access for the nat rules ip.
attached the orginal firewall script in which nat rules was successfully working but after changing the for loop values with for((i=1;$i<30;i++)) nat rules stopped working.
i think i should not include the ips in the for loop which is reserved for the nat rules.  but iam not sure please help me where iam going wrong.
Thanks in advance.
Attachments:
 
orginal firewall script before changing the for loop values
 

Answer : linux router with iptables script

for((i=1;$i<39;i++))
do
    iptables -A FORWARD -p tcp -s 192.168.0.$i -d  202.137.237.24 --dport 587 -j ACCEPT
    iptables -A FORWARD -p tcp -s 192.168.0.$i -d  202.137.236.12 --dport 587 -j ACCEPT
    iptables -A FORWARD -p tcp -s 192.168.0.$i -d  202.137.237.24 --dport 25 -j ACCEPT
    iptables -A FORWARD -p tcp -s 192.168.0.$i -d  202.137.237.26 --dport 110 -j ACCEPT
    iptables -A FORWARD -p tcp -s 192.168.0.$i -d  202.137.236.12 --dport 25 -j ACCEPT
    iptables -A FORWARD -p tcp -s 192.168.0.$i -d  202.137.236.11 --dport 110 -j ACCEPT
   iptables -A FORWARD -p tcp -s 192.168.0.$i -j DROP
done
Random Solutions  
 
programming4us programming4us