I can do it using an intermediate pcap file:
tcpdump -i lo -s 0 -w out.pcap 'tcp and port 12345'
^C
tcpreplay -i eth1 out.pcap
Is it possible to skip the pcap and forward all the traffic immediately? This would be extremely useful for long-running captures, where the pcaps can grow to gigabytes in size.