[OpenSIPS-Users] openSIPs behind NAT

Andrew Pogrebennyk andrew.pogrebennyk at portaone.com
Fri Sep 12 18:17:40 CEST 2008


Andrijana,

ACKs are always tricky to get to work in setups like this :)
ACK must not have proxy IPs in both rURI and Route. If all the routing 
information (Route+rURI) is pointing to your server there is no 
information about the end device (where OpenSIPS should send further the 
request). I think you are using the old scheme with fix_nated_contact() 
and not fix_nated_register().

I do not expect any problems with calls from/within the internal 
network. You can compare source and destination IPs of the request or 
response against network specification and insert needed IP address into 
RR header with record_route_preset or SDP with fix_nated_sdp() depending 
on the result. e.g.:
if (src_ip == 10.0.0.0/8) {
   record_route_preset("192.168.1.1")
} else {
   record_route_preset("145.18.29.67")
}

I am not going into details but if you are having some particular 
problem please ask.

Andrijana Popovska wrote:
> 
> Hi Andrew,
> 
> Sorry for not explaining correctly.
> The server doesn't have a public IP, it is the public mapping that is configured on the NAT.
> 
> Both the 200OK and the ACK are captured on the PC, where the clients are. 
> 
> If I use record_route(), then the "200OK" sent from the client is sent to the internal address (10.133.305.200).
> 
> If I use record_route_preset("145.18.29.67")  instead, then the 200 OK sent from the client is proxied through the server to the other client. On the other hand, the responding ACK has route=145.18.29.67 so the server actually sends it to it self. I've used Ethereal on the server to confirm this.
> 
> Is there a solution to this, and can the solution also include calls from the internal network?
> 
> Regards,
> Andrijana 

-- 
Sincerely,
Andrew Pogrebennyk



More information about the Users mailing list