Você pode usar o iptables com o --tcp-flags
argumento :
--tcp-flags [!] mask comp
Match when the TCP flags are as specified. The first argument is the flags which we should examine, written as a comma-separated list, and the second argument is a comma-separated list of flags which must be set. Flags are: SYN ACK FIN RST URG PSH ALL NONE. Hence the command
iptables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST SYN
will only match packets with the SYN flag set, and the ACK, FIN and RST flags unset.
Eu não tenho uma caixa de Linux útil para despertar o encantamento certo, mas acho que seria algo como:
iptables -t nat -A PREROUTING -p tcp --tcp-flags ACK ACK --dest 10.0.1.234 --dport 56789 -j DNAT --to:destination 10.1.1.111:6661