[OpenSIPS-Users] MediaProxy and redirected traffic question

Saúl Ibarra Corretgé saul at ag-projects.com
Tue Apr 12 09:21:58 CEST 2011


Hi,

On 5/4/11 9:54 PM, Stylianos Papanastasiou wrote:
> Hi everyone,
>
> I am running opensips with mediaproxy and so the media traffic from my
> two SIP terminals runs through an intermediate machine. Now, I want to
> do some media traffic manipulation so I redirect the incoming traffic to
> some port on the intermediate machine using iptables. Assuming my
> terminals are 10.0.0.2 and 10.0.0.3 and the media-proxy is 10.0.0.1 -
> and the video traffic comes from port 9078 from both terminals I give:
>
> iptables -t nat -A PREROUTING -i eth0  -p udp -s 10.0.0.2 --sport 9078
> -j REDIRECT --to-port 40000
> iptables -t nat -A PREROUTING -i eth0  -p udp -s 10.0.0.3 --sport 9078
> -j REDIRECT --to-port 40001
>

MediaProxy does insert contrack rules to direct the traffic, as you 
know, and the fact that you are altering the routing with iptables may 
have serious implications on what happens from that point on. MediaProxy 
told the kernel to redirect packets coming from 10.0.0.2 and port X to 
10.0.0.3 port Y, but you introduced another routing rule I don't expect 
packets to 'fork'.


-- 
Saúl Ibarra Corretgé
AG Projects



More information about the Users mailing list