From: "François Delawarde" <fdelawarde@wirelessmundi.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] SIP, NAT, and load balancing problems
Date: Wed, 13 Dec 2006 10:12:19 +0000 [thread overview]
Message-ID: <457FD203.9010402@wirelessmundi.com> (raw)
In-Reply-To: <457EC047.7090404@wirelessmundi.com>
Thank you for suggestions, below are my comments:
Grant Taylor wrote:
>> The redirection is working, but the source port is changed by the
>> MASQUERADE, and this doesn't work with SIP/RTP, which contain reply
>> information (ip/port) inside its packets.
>
> If Asterisk is running directly on the firewall box, why are you even
> MASQUERADEing or SNATing the packets? Why not have Asterisk bind
> directly to the external IP? This way MASQUERADE will not get in your
> way as far as changing the ports on you.
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. :-)
>> Below you can find my network configuration (rules, routes and
>> addresses). Anyone has an idea of how i could resolve this problem?
>
> I'm looking, but for some reason I can not find it. ;)
>
> Some things to consider:
> - Set up a routing table just for Asterisk.
> - Identify Asterisk traffic via MARKed packets.
> - MARK the packets based on the OWNER match extension. To do this
> Asterisk would need to run as it's own user, which should not be a
> problem.
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?
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.
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.
> Grant. . . .
> _______________________________________________
> LARTC mailing list
> LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
>
Thanks a lot for your time,
François....
_______________________________________________
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 10:12 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 [this message]
2006-12-13 10:33 ` François Delawarde
2006-12-13 15:30 ` Taylor, Grant
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=457FD203.9010402@wirelessmundi.com \
--to=fdelawarde@wirelessmundi.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox