Hi,In fact my network is not 10.0.0.0 ; that was just an example (bad example).The network addresses are specific public network addresses (lets say 3 different C Class network) and has no relation to NAT.That's why I need to check the IP adrresses (from and to) of the SIP message before deciding if it should use mediaproxy or not.Any idea how to do that ?Soruce address can be checked as :if (src_ip="195.1.1.+") {}but that won't be same for destination address as "dst_ip" is the SER server ip.How can I check the ip address of the client that the SIP message will be forwarded ?Thanks,ilker
Yes, and your network is in the RFC1918 (private) address space, so you can use the same logic (even without change as you want to proxy when the address is on your network).
From: Greger V. Teigre [mailto:greger@teigre.com]
Sent: Tuesday, June 20, 2006 10:26 PM
To: İlker Aktuna (Koç.net)
Cc: serusers@iptel.org
Subject: Re: [Serusers] checking source ip and dest ip
g-)
İlker Aktuna (Koç.net) wrote:In fact, I am not looking for "if address is NATed or not", I need to check if address belongs to my network or not.what do you mean by RFC1918 addresses ?Thanks,ilker
Why not test for RFC1918 addresses? That's what the onsip.org nat-handling scripts do. A NATed destination is determined by a flag in the location record and the src ip is checked with nat_uac_test(). It will give a more robust NAT handling that testing on IP addresses for parts of the RFC1918 addresses.
From: Greger V. Teigre [mailto:greger@teigre.com]
Sent: Tuesday, June 20, 2006 1:40 PM
To: İlker Aktuna (Koç.net)
Cc: serusers@iptel.org
Subject: Re: [Serusers] checking source ip and dest ip
The problem has already been solved, why not reuse? ;-)
g-)
İlker Aktuna (Koç.net) wrote:Hi,I need to check source ip of a SIP message and also destination IP to which the message will be sent.i.e. I will use mediaproxy only if the one of the ip addresses match 10.0.0.0 / 255.0.0.0is it possible ?Thanks,ilkerC "-//W3C//DTD HTML 4.0 Transitional//EN">In fact, I am not looking for "if address is NATed or not", I need to check if address belongs to my network or not.what do you mean by RFC1918 addresses ?Thanks,ilker
Why not test for RFC1918 addresses? That's what the onsip.org nat-handling scripts do. A NATed destination is determined by a flag in the location record and the src ip is checked with nat_uac_test(). It will give a more robust NAT handling that testing on IP addresses for parts of the RFC1918 addresses.
From: Greger V. Teigre [mailto:greger@teigre.com]
Sent: Tuesday, June 20, 2006 1:40 PM
To: İlker Aktuna (Koç.net)
Cc: serusers@iptel.org
Subject: Re: [Serusers] checking source ip and dest ip
The problem has already been solved, why not reuse? ;-)
g-)
İlker Aktuna (Koç.net) wrote:Hi,I need to check source ip of a SIP message and also destination IP to which the message will be sent.i.e. I will use mediaproxy only if the one of the ip addresses match 10.0.0.0 / 255.0.0.0is it possible ?Thanks,ilkerC "-//W3C//DTD HTML 4.0 Transitional//EN">Hi,In fact my network is not 10.0.0.0 ; that was just an example (bad example).The network addresses are specific public network addresses (lets say 3 different C Class network) and has no relation to NAT.That's why I need to check the IP adrresses (from and to) of the SIP message before deciding if it should use mediaproxy or not.Any idea how to do that ?Soruce address can be checked as :if (src_ip="195.1.1.+") {}but that won't be same for destination address as "dst_ip" is the SER server ip.How can I check the ip address of the client that the SIP message will be forwarded ?Thanks,ilker
Yes, and your network is in the RFC1918 (private) address space, so you can use the same logic (even without change as you want to proxy when the address is on your network).
From: Greger V. Teigre [mailto:greger@teigre.com]
Sent: Tuesday, June 20, 2006 10:26 PM
To: İlker Aktuna (Koç.net)
Cc: serusers@iptel.org
Subject: Re: [Serusers] checking source ip and dest ip
g-)
İlker Aktuna (Koç.net) wrote:In fact, I am not looking for "if address is NATed or not", I need to check if address belongs to my network or not.what do you mean by RFC1918 addresses ?Thanks,ilker
Why not test for RFC1918 addresses? That's what the onsip.org nat-handling scripts do. A NATed destination is determined by a flag in the location record and the src ip is checked with nat_uac_test(). It will give a more robust NAT handling that testing on IP addresses for parts of the RFC1918 addresses.
From: Greger V. Teigre [mailto:greger@teigre.com]
Sent: Tuesday, June 20, 2006 1:40 PM
To: İlker Aktuna (Koç.net)
Cc: serusers@iptel.org
Subject: Re: [Serusers] checking source ip and dest ip
The problem has already been solved, why not reuse? ;-)
g-)
İlker Aktuna (Koç.net) wrote:Hi,I need to check source ip of a SIP message and also destination IP to which the message will be sent.i.e. I will use mediaproxy only if the one of the ip addresses match 10.0.0.0 / 255.0.0.0is it possible ?Thanks,ilkerC "-//W3C//DTD HTML 4.0 Transitional//EN">In fact, I am not looking for "if address is NATed or not", I need to check if address belongs to my network or not.what do you mean by RFC1918 addresses ?Thanks,ilker