Direct port 5060 (SIP Asterisk) to eth1

Asked

Viewed 441 times

0

I am intending to use iptables in Centos 6.5 for all Freepbx (Asterisk) outputs via eth1.

I have two network interfaces:

eth0 --> internal network (for connecting Pcs to Softphone)
eth1 --> internet (All Voip outputs)

The rule: iptables -A PREROUTING -i eth1 -t mangle -p tcp --dport 5060 -j MARK --set-mark 1

I want to target the SIP to eth1 only, but I’m unsuccessful

  • 1

    Geez, who clicked the negative and didn’t even explain why? How can I do it right?

  • Don’t worry, it happens. See here, I already used this page as a reference: http://asteriskbrasil.org/pipermail/asteriskbrasil/2006-December/012267.html

2 answers

1

You need to direct beyond the 5060 log ports, also the RTP ports, otherwise you will only authenticate but will not pass audio.

1

Asterisk uses port 5060 UDP by default, therefore, unless you have changed the transport of SIP signaling to TCP, this may be the problem.

Additionally Asterisk uses a high port range for audio/video traffic: 10000 to 20000 UDP, and rules need to be created for this range as well.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.