[Users] UA behind NAT puts public IP in Contact, Via - help

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Mar 23 17:31:33 CET 2006


Hi Arek,

my advice will be to avoid changing stuff into the proxy just to make 
broken clients to work. Better try to fix the problem on its root, in 
the client or simply change the client with a better one.

regards,
bogdan

Arek Bekiersz wrote:

>...and I answer myself.
>
>Of course I don't need the Via value. It's not the private IP I want , but
>obviously the received, public one. Come on, I was tired, sorry :-)))
>
>For this UA I will try to solve the problem using AVP module, or I will
>write some custom functions elsewhere. I just need to store real, public
>(received) IP in 'location' table,  together with NAT-ed flag. Could be done
>either with appending Contact HF with received IP, by some clever avp
>"store-retrieve" usage or otherwise.
>
>
>--
>Regards,
>Arek Bekiersz
>
>
>----- Original Message ----- 
>From: "Arek Bekiersz" <arek at perceval.net>
>To: "Bogdan-Andrei Iancu" <bogdan at voice-system.ro>
>Cc: "Openser-Users" <users at openser.org>
>Sent: Tuesday, March 21, 2006 8:03 PM
>Subject: Re: [Users] UA behind NAT puts public IP in Contact, Via - help
>
>
>  
>
>>Hi Bogdan,
>>
>>I think it should be possible by some flag manipulation, with some help
>>from registrar module. I can:
>>
>>1. Set NAT-ed flag (flag 1) on first REGISTER, that comes with private
>>IP in Via
>>2. If flag (1) is set, store "temporary" registration in "location"
>>table, with  flag (let's say flag 10)
>>3. challenge user
>>4. when second REGISTER comes (with public IP Via ,so there is no (1)
>>flag) check if UA is "already" in "location" table and the flag (10) was
>>stored
>>5. If yes, set flag (1) (UA wanted to cheat us, he is NATed), answer
>>'200 OK' and store in "location" table, this time with flag (1)
>>6. Next actions will assume that user is NAT-ed, by checking (1) flag in
>>"location". He will also be pinged from SER. Pretty standard stuff.
>>
>>
>>However, the problem is there is no "Contact" in first REGISTER. So I
>>cannot store temporary entry in "location" database.. But the true
>>(private) IP of user is still in Via. So maybe I could append "Contact"
>>header field with IP value from Via. It would allow me to store this
>>"temporary" registration.
>>
>>QUESTION: Do we have any access to Via value from ser.cfg, to append
>>Contact HF with Via value? And not the topmost, but the last Via, as
>>this will probably contain true private IP of UA?
>>
>>Help!!!
>>
>>I don't want to write another custom module or database for this stupid
>>UA. In fact last year I had to write custom module for SDP manipulation.
>>It was impossible to set codec preference in the SAME vendor's devices.
>>I had preferred system codec and I had to force it using brute force...
>>works until today...
>>
>>
>>
>>-- 
>>Regards,
>>Arek Bekiersz
>>
>>
>>Bogdan-Andrei Iancu wrote:
>>    
>>
>>>it's not about RFC compliance here, but about making it work, about the
>>>logic used to detect and traverse NATS , things that are not specified
>>>by RFC.
>>>I guess it should be reasonable from them to accept to make this auto
>>>NAT detection configurable in order to disable it.
>>>alternative solutions will be (1) to consider all these UAC as nated -
>>>by looking at UA hdr- or (2) to try to remember the NAT flag from the
>>>non-authenticated REGISTER until the auth-ed one - the first
>>>(challenged) register will reveal the true status of the clients (nated
>>>or not) as it's also used by client for nat detection....but I guess it
>>>will be quite complicated
>>>      
>>>
>
>  
>





More information about the sr-users mailing list