I have a router, running Debian/Linux 4.1, which has:
- eth0: 192.168.1.1 attached to a LAN, running DHCPd for wired clients.
- wan0: 18.104.22.168 attached to the internet
- wan1: 22.214.171.124 attached to the internet
I want UDP traffic from the LAN, to host H, port P, to be duplicated and NATted out through both wan0 and wan1.
e.g. routing a packet from 192.168.1.2, with the correct destination host/port, should result in two NATted packets - one sent out through wan0 and one through wan1, both with the same destination host and port.
(The requirement is that particular types of UDP traffic must be sent though both interfaces, minimising latency at the cost of bandwidth. The UDP protocol in question is idempotent, and so is happy to receive duplicate packets, NATted from different router addresses.)
How can I do this with kernel 4.1/iptables? (There are already solutions with later kernels and nftables.)