$IPT -P INPUT DROP
$IPT -P OUTPUT ACCEPT
$IPT -P FORWARD DROP
$IPT -A INPUT -i ${WAN} -d ${WAN_IP} -p tcp --dport 22 -j ACCEPT
$IPT -A FORWARD -p all -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPT -A FORWARD -m state --state INVALID -j DROP
$IPT -A FORWARD -p tcp ! --syn -m state --state NEW -j DROP
$IPT -A FORWARD -p tcp -m connlimit --connlimit-above 10 --connlimit-mask 32 -j DROP
$IPT -A FORWARD -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m connlimit --connlimit-above 10 --connlimit-mask 32 -j DROP
$IPT -A FORWARD -p tcp --dport 80 -j ACCEPT
$IPT -t nat -A PREROUTING -p tcp -i ${WAN} -d ${WAN_IP} --dport 80 -j DNAT --to-destination ${LOCAL_VM_1}:80
$IPT -t nat -A PREROUTING -p tcp -i ${WAN} -d ${WAN_IP} --dport 8080 -j DNAT --to-destination ${LOCAL_VM_2}:80
$IPT -N syn_flood
$IPT -A FORWARD -p tcp --syn -j syn_flood
$IPT -A syn_flood -m limit --limit 200/sec --limit-burst 500 -j DROP
$IPT -A syn_flood -j DROP