Using socat to copy multicast from one network to another

731 Views Asked by At

I'm trying to copy/rebroadcast an incoming multicast channel from one address to another, so I figured socat would let me do this.

If I already have something joined to that network and logging to console:

./socat UDP4-RECVFROM:14314,reuseaddr - | ./socat - udp-sendto:239.160.2.13:14314

or if I don't:

./socat UDP4-RECVFROM:14314,ip-add-membership=233.158.8.5:0.0.0.0 - | ./socat - udp-sendto:239.160.2.13:14314

But these exit after the first packet or so, so then I figured adding, fork would help but that just seems to create another publisher for every packet received so there was a massive echo.

Any suggestions please on how to fix this? I've tried the dest-unreach cheatsheet but nothing there seems to match my exact need. I'm probably missing something really obvious.

0

There are 0 best solutions below