[Serusers] Registrations behind NAT problem.

Greger V. Teigre greger at teigre.com
Wed Sep 20 07:50:48 CEST 2006


Three options:
1. Turn off ALG if possible (normally is)
2. Try to detect that something has been messed up: use 
nat_uac_test("16") to test for source ip:port different from (was it?) 
via (or contact? don't remember). Keep contact as is (so the alg can 
change correctly back), but use fix_nated_contact() on outgoing messages
3. Change box

A broken ALG doesn't have to be a problem though, if you can fix it. 
Also you can try stun in your ua, as some ALGs won't touch an already 
correct public message (only works for non-symmetric NATs though).
g-)

Andrey Kuprianov wrote:
> I see. Thank you Greger! However, is there anything I can do about it,
> besides changing the box? :) I assume there should be an option to
> disable fixing my messages.
>
>  Regards,
>
>   Andrey.
>
> On 9/19/06, Greger V. Teigre <greger at teigre.com> wrote:
>> Hi Andrey,
>> As long as you use fix_nated_register(), ser will leave contact from ua
>> intact, but add received parameter.
>> Most likely the wireless box has a SIP ALG and the ALG tries to "fix"
>> SIP exchanges by changing contact and vias.  Many SIP ALGs are broken.
>> g-)
>>
>> Andrey Kuprianov wrote:
>> > Hi,
>> >
>> > Im facing some weird problem, when users register from behind NAT. Let
>> > me try to break it down.
>> >
>> > First of all, Im using ser 0.9.6 and my configuration file is almost
>> > identical to that of mediaproxy+nat config file from getting started
>> > bundle. I have asked my friends and colleagues to test my SIP-based
>> > application behind NAT with their ADSL modems and strange thing
>> > happens:
>> >
>> > 1. While one guy (say user1) has ADSL modem, which gives him address
>> > of 192.168.0.3, he can register w/o problem. Contact header
>> > <sip:user1 at 192.168.0.3:5060;transport=udp>;q=1.0
>> >
>> > is sent in REGISTER request, and received back with 200 OK as
>> >
>> > 
>> <sip:user1 at 192.168.0.3:5060;transport=udp>;q=1.0;expires=3600;received="sip:61.47.x.x:5060" 
>>
>> >
>> >   (i have put "x" by myself)
>> >
>> > 2. Another guy (user2) has ADSL modem connected to a wireless access
>> > point. The application sends in Contact:
>> >
>> > <sip:surat at 10.0.0.12:5060;transport=udp>;q=1.0
>> >
>> > but gets back in 200 OK (attention !!!):
>> >
>> > 
>> <sip:surat at 124.120.x.x:41854;transport=udp>;q=1;expires=3600;received="sip:124.120.x.x:43041" 
>>
>> >
>> >
>> > It gets Contact with a public IP back, which is not the case with
>> > user1. How come?
>> > I *wonder* why this is happening... Some kind of weird NAT?
>> >
>> > I'd really appreciate if anyone can shed some light on this issue.
>> >
>> >   Bests,
>> >
>> >     Andrey.
>> > _______________________________________________
>> > Serusers mailing list
>> > Serusers at lists.iptel.org
>> > http://lists.iptel.org/mailman/listinfo/serusers
>> >
>> >
>>
> _______________________________________________
> Serusers mailing list
> Serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>
>



More information about the sr-users mailing list