para TCP você tem que considerar o estado, isso deve ajudar ...: -)
#cleaning rules
iptables -F
iptables -t nat -F
#Standard behaviour
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
# accept established connections
iptables -A INPUT -p ALL -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
# loopback interface
iptables -A INPUT -p ALL -i lo -j ACCEPT
#SSH
iptables -A INPUT -p tcp --dport 22 -m state --state NEW -j ACCEPT
#iptables -A OUTPUT -p tcp --sport 22 -m state --state NEW -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT
#DNS
#iptables -A OUTPUT -p udp --dport 53 --sport 1024:65535 -j ACCEPT
iptables -A INPUT -p udp --sport 53 --dport 1024:65535 -j ACCEPT
#GIT
#iptables -A OUTPUT -p tcp --dport 9418 -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp --sport 9418 -m state --state NEW -j ACCEPT
#SSL
iptables -I INPUT -p tcp -m state --state NEW --dport 443 -j ACCEPT