Hello everyone!
Can you guys give your oppinion on my /usr/local/sbin/post-firewall ?
I've based it from wirespot's post in here.
As you can see, I want to keep myself stealthed, but I also want to open ports 17300 to 17305 for Transmission. I don't want to ssh in from outside, just from the local network, neither to open Samba to outside.
Also, I found somewhere the lines about the DNS (I use OpenDNS).
Here's the file:

$ cat /usr/local/sbin/post-firewall


# Default policies
iptables -P INPUT DROP                   
iptables -I INPUT 1 -m state --state RELATED,ESTABLISHED -j ACCEPT
#iptables -I OUTPUT 1 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT

# Always allow SSH!
iptables -I INPUT 2 -s -d --dport 22 -j ACCEPT

# Accept all tcp SYN packets for protocols SMTP, HTTP, HTTPS, and SSH
iptables -A INPUT -p tcp -s "$4" -d --dport 25 --syn -j ACCEPT

# Allow access from outside on this portrange: 17300:17305.
for P in 17300:17305; do                                  
  iptables -I INPUT 3 -p "$1" --syn --dport $P -j ACCEPT  

# DNS queries:
# Permit responses from OpenDNS: 
iptables -A INPUT -p udp -s --sport 53 -d "$4" --dport 1024:65535 -j ACCEPT
iptables -A INPUT -p udp -s --sport 53 -d "$4" --dport 1024:65535 -j ACCEPT

echo "$@" > /usr/local/root/param.log
Also, when I've run post-firewall from the console, I got the following output in the console:
iptables v1.2.7a: Unknown arg `--dport'
How can i correct this?