From: "Taylor, Grant" <gtaylor@riverviewtech.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] SIP, NAT, and load balancing problems
Date: Wed, 13 Dec 2006 15:30:20 +0000 [thread overview]
Message-ID: <45801C8C.5040804@riverviewtech.net> (raw)
In-Reply-To: <457EC047.7090404@wirelessmundi.com>
François Delawarde wrote:
> Thank you for suggestions, below are my comments:
You are welcome.
> It's actually the first thing i tried, but as I need to offer service to
> both WAN and LAN, and the Asterisk SIP cannot bind to multiple IPs. It
> only offers to bind it to a unique IP or 0.0.0.0 (and from the feedback
> i got, they don't intend to implement that any time soon). I could
> probably run multiple instances or implement this myself, but I don't
> have that much talent and time to do those complicated things. :-)
Um, I'm going to have to disagree with you. I have run Asterisk in the
past (in production) where it would bind to multiple IPs. The only
caveat that I can think of is that it may only bind to one IP in a
subnet, or some other strangeness with this. .... I just logged in to
a colleague's system that is running Asterisk for about 4 different
subnets on one system. Asterisk is bound to 0.0.0.0 so that it can
serve any and all subnets. If you would like help configuring Asterisk
bind to multiple subnets let me know (via direct email) and I'll be glad
to try to help.
> I tried the owner match thing, maybe I did it wrong, but I end up with
> the same type of problems. When Asterisk needs to send traffic to WAN,
> it seem to bind to one of the two WAN IPs at random, and I end up with
> the same NATing problems when it chooses the wrong interface/IP. I also
> tried to inverse that: MARK all packets that are not Asterisk, put a
> special rule/table for that traffic and configure "default" (from all)
> routing table to only one WAN interface. I'm not 100% sure if i did it
> correctly, but do you think it's worth trying again?
If Asterisk is only listening to one IP and you are routing to get to
your other network, you could end up with some really weird issues that
will be very difficult to over come, probably MUCH harder than resolving
the issue with Asterisk only binding to one interface.
> Maybe this could be the type of solution I'm looking for if only i knew
> a little more about that. Do you know how a process chooses an IP when
> binding to 0.0.0.0? Is the kernel doing this, and how/when? Maybe I
> could cheat in that case, and make Asterisk or the kernel or whichever
> does the binding think that there is only one WAN interface.
As I understand it, when processes let the system choose the proper IP
to use, the system will chose the IP that is associate with the closest
route to the destination. In short, if the target is on Subnet A, then
the IP for Subnet A will be used. If the target is on Subnet B, then
the IP for Subnet B will be used.
> Also do you think that I could use some help from the netfilter SIP
> helper? I didn't try but I think it would probably do the same.
I'm not familiar with the SIP connection tracking helper. However, I do
believe it would be worth your time to investigate it to see if it will
help you. If you do continue to SNAT / MASQUERADE your outbound SIP
traffic, there is a good chance that the SIP helper will indeed help.
This is of course presuming that the SIP helper is meant to help the
SNAT / MASQUERADE module correctly choose the information that gets put
in to packets. Think about how the FTP connection tracking helper works
when dealing with active / passive data streams and ports.
Grant. . . .
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
next prev parent reply other threads:[~2006-12-13 15:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-12 14:44 [LARTC] SIP, NAT, and load balancing problems François Delawarde
2006-12-12 19:54 ` Andrew McGill
2006-12-13 6:40 ` Grant Taylor
2006-12-13 10:12 ` François Delawarde
2006-12-13 10:33 ` François Delawarde
2006-12-13 15:30 ` Taylor, Grant [this message]
2006-12-13 20:48 ` Grant Taylor
2006-12-13 21:57 ` Grant Taylor
2006-12-13 22:44 ` Grant Taylor
2006-12-13 22:57 ` Patrick McHardy
2006-12-14 11:44 ` François Delawarde
2006-12-14 11:59 ` François Delawarde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45801C8C.5040804@riverviewtech.net \
--to=gtaylor@riverviewtech.net \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.