Q: transform unicast to multicast with iptables?

Antony Stone Antony@Soft-Solutions.co.uk
Wed, 2 Oct 2002 08:39:43 +0100

On Wednesday 02 October 2002 8:16 am, Karasik, Vitaly wrote:

> Is is possible to transform unicast UDP stream to multicast output with
> iptables NAT?

I don't see why not, so long as the original packets are not being created on 
the netfilter machine itself.

Just put a rule in the PREROUTING chain like so:

iptables -A PREROUTING -t nat -d a.b.c.d -j DNAT --to w.x.y.z

where a.b.c.d is the unicast address your application was sending to, and 
w.x.y.z is the mutlicast address you want to broadcast to.



There are two possible outcomes.

If the result confirms the hypothesis, then you've made a measurement.
If the result is contrary to the hypothesis, then you've made a discovery.

 - Enrico Fermi