On 07/12/2012 12:38 PM, Freddi Hansen wrote:

We have since Asterisk 1.2 been using a configuration with 6 NIC's
bonding to 3 networks, one public internet and 2 private networks.
Routing calls between networks and having phones on all 3 networks is no
problem.

There is one case though where we do fixup with iptables.
We have 30 virtuel adresses on one of the private networks and when
Asterisk sends a packet to a destination then the first address of the
NIC is inserted as source  by the OS.

example
one NIC has ip's
192.168.0.10,192.168.0.20,192.168.30
Telephone (192.168.0.100) sends a packet to Asterisk 192.168.0.30,
Asterisk sends response to 192.168.0.100 but with source address
192.168.0.10 as thats the first ip on that NIC.

In Iptables OUTPUT q we do a set-mark to an index into our source ip's
then in POSTROUTING we insert the source adr using the mark

Yes, this is the situation I referred to earlier. In your case, it's all on one interface, but the server has multiple addresses on the *same* network, and thus it cannot know (without help) with address should be used for outbound packets.

--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
Jabber: kflem...@digium.com | SIP: kpflem...@digium.com | Skype: kpfleming
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at www.digium.com & www.asterisk.org



--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to