Der Form halber, so würde es jetzt ganz aussehen
#---------------------------------------------------------------------------
# Pakete, die geroutet werden
#---------------------------------------------------------------------------
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
# TCP - RDP
iptables -A FORWARD -s xxx.xxx.0.xxx/16 -d xxx.xxx.0.xxx/16 -p tcp -m tcp --dport 3389 -m state --state NEW -j ACCEPT
# TCP www,https
iptables -A FORWARD -p tcp -m tcp -s xxx.xxx.9.xxx/24 --dport ssh -m state --state NEW -j ACCEPT
iptables -A FORWARD -p tcp -m tcp -s xxx.xxx.9.xxx/24 --dport www -m state --state NEW -j ACCEPT
iptables -A FORWARD -p tcp -m tcp -s xxx.xxx.9.xxx/24 --dport https -m state --state NEW -j ACCEPT
iptables -A FORWARD -p tcp -m tcp -s xxx.xxx.9.xxx/24 --dport ftp -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A FORWARD -p tcp -m tcp -s xxx.xxx.0.xxx/16 --dport ftp -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A FORWARD -p tcp -m tcp -s xxx.xxx.9.xxx/24 --dport 3000 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A FORWARD -p tcp -m tcp -s xxx.xxx.0.xxx/16 -d xxx.xxx.9.xxx/24 --dport ftp -m state --state NEW,ESTABLISHED -j ACCEPT
# TCP - pcAnywhere
iptables -A FORWARD -s xxx.xxx.0.xxx/16 -d xxx.xxx.0.xxx/16 -p tcp -m tcp --dport 5631:5632 -m state --state NEW -j ACCEPT
iptables -A FORWARD -s xxx.xxx.0.xxx/16 -d xxx.xxx.0.xxx/16 -p tcp -m tcp --dport 3128 -m state --state NEW,ESTABLISHED -j ACCEPT
# UDP www,https
iptables -A FORWARD -p udp -m udp -s xxx.xxx.9.xxx/24 --dport www -m state --state NEW -j ACCEPT
iptables -A FORWARD -p udp -m udp -s xxx.xxx.9.xxx/24 --dport https -m state --state NEW -j ACCEPT
# ICMP
iptables -A FORWARD -s xxx.xxx.0.0/16 -d xxx.xxx.0.0/16 -p icmp -j ACCEPT
#---------------------------------------------------------------------------
# Pakete, die hereinkommen
#---------------------------------------------------------------------------
iptables -A INPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
# TCP
iptables -A INPUT -p tcp -m tcp -s xxx.xxx.9.xxx/24 --dport 137:139 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp -m tcp -i ! eth1 --dport 9011 -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp -m tcp -s xxx.xxx.9.xxx/24 --dport ssh -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp -m tcp -s xxx.xxx.9.xxx/24 --dport ftp -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp -m tcp -s xxx.xxx.0.0/16 --dport ftp -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp -m tcp -s xxx.xxx.9.xxx/24 --dport www -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp -m tcp -s xxx.xxx.9.xxx/24 --dport https -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp -m tcp -i ! eth1 --dport gds_db --sport 1024:65535 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp -m tcp -s 0.0.0.0 --dport 3060 --sport 1024:65535 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp -m tcp -i ! eth1 --dport smtp -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp -m tcp -s xxx.xxx.9.xxx/24 --dport swat -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp -m tcp -s xxx.xxx.9.xxx/24 --dport mysql -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp -m tcp -s xxx.xxx.9.xxx/24 --dport 10000 -m state --state NEW -j ACCEPT
# UDP
iptables -A INPUT -p udp -m udp -s xxx.xxx.9.xxx/24 --dport 137:139 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p udp -m udp -s xxx.xxx.9.xxx/24 --dport www -m state --state NEW -j ACCEPT
iptables -A INPUT -p udp -m udp -s xxx.xxx.9.xxx/24 --dport https -m state --state NEW -j ACCEPT
iptables -A INPUT -p udp -m udp -s xxx.xxx.9.xxx/24 --dport mysql -m state --state NEW -j ACCEPT
# ICMP
iptables -A INPUT -p icmp -j ACCEPT
#---------------------------------------------------------------------------
# Pakete, die herausgehen
#---------------------------------------------------------------------------
iptables -A OUTPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
# TCP
iptables -A OUTPUT -p tcp -m tcp -d xxx.xxx.9.xxx/24 --dport 137:139 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp --dport 9011 -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp --dport ssh -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp --dport ftp -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp --dport ftp-data -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp --dport pop3 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp -o ! eth1 --dport smtp -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp --dport www -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp --dport https -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp --dport domain -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp --sport gds_db --dport 1024:65535 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp --sport 3060 --dport 1024:65535 -m state --state NEW,ESTABLISHED -j ACCEPT
# UDP
iptables -A OUTPUT -p udp -m udp -d xxx.xxx.9.x/24 --dport 137:139 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p udp -m udp --dport www -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p udp -m udp --dport https -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p udp -m udp --dport domain -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p udp -m udp --dport mysql -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p udp -m udp --dport pop3 -m state --state NEW -j ACCEPT
# ICMP
iptables -A OUTPUT -p icmp -j ACCEPT