<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-9" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
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).<br>
g-)<br>
<br>
İlker Aktuna (Koç.net) wrote:
<blockquote cite="mid7EB6E3B0D22DF54585D1CEB9642E3198D85C7C@owa.koc.net"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-16">
  <title></title>
  <meta content="MSHTML 6.00.2900.2838" name="GENERATOR">
  <div>
  <div dir="ltr" align="left"><span class="970384110-20062006"><font
 color="#0000ff" face="Arial" size="2">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.</font></span></div>
  <div dir="ltr" align="left"><span class="970384110-20062006"></span> </div>
  <div dir="ltr" align="left"><span class="970384110-20062006"><font
 color="#0000ff" face="Arial" size="2">what do you mean by RFC1918
addresses ?</font></span></div>
  <div dir="ltr" align="left"><span class="970384110-20062006"></span> </div>
  <div dir="ltr" align="left"><span class="970384110-20062006"><font
 color="#0000ff" face="Arial" size="2">Thanks,</font></span></div>
  <div dir="ltr" align="left"><span class="970384110-20062006"><font
 color="#0000ff" face="Arial" size="2">ilker</font></span></div>
  <br>
  <div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us">
  <hr tabindex="-1"><font face="Tahoma" size="2"><b>From:</b> Greger V.
Teigre [<a class="moz-txt-link-freetext" href="mailto:greger@teigre.com">mailto:greger@teigre.com</a>] <br>
  <b>Sent:</b> Tuesday, June 20, 2006 1:40 PM<br>
  <b>To:</b> İlker Aktuna (Koç.net)<br>
  <b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:serusers@iptel.org">serusers@iptel.org</a><br>
  <b>Subject:</b> Re: [Serusers] checking source ip and dest ip<br>
  </font><br>
  </div>
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. <br>
The problem has already been solved, why not reuse? ;-)<br>
g-)<br>
  <br>
İlker Aktuna (Koç.net) wrote:
  <blockquote
 cite="mid7EB6E3B0D22DF54585D1CEB9642E3198D85C7A@owa.koc.net"
 type="cite">
    <meta http-equiv="EXPIRES" content="0">
    <meta http-equiv="EXPIRESABSOLUTE"
 content="Tue, 01 Jun 1999 12:00:00 GMT">
    <meta http-equiv="PRAGMA" content="NO-CACHE">
    <meta http-equiv="CACHE-CONTROL" content="PRIVATE">
    <meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
    <meta content="MSHTML 6.00.2900.2838" name="GENERATOR">
    <div>
    <div><span class="589102510-20062006"><font color="#0000ff"
 face="Arial" size="2">Hi,</font></span></div>
    <div><span class="589102510-20062006"></span> </div>
    <div><span class="589102510-20062006"><font color="#0000ff"
 face="Arial" size="2">I need to check source ip of a SIP message and
also destination IP to which the message will be sent.</font></span></div>
    <div><span class="589102510-20062006"><font color="#0000ff"
 face="Arial" size="2">i.e. I will use mediaproxy only if the one of
the ip addresses match 10.0.0.0 / 255.0.0.0</font></span></div>
    <div><span class="589102510-20062006"></span> </div>
    <div><span class="589102510-20062006"><font color="#0000ff"
 face="Arial" size="2">is it possible ?</font></span></div>
    <div><span class="589102510-20062006"></span> </div>
    <div><span class="589102510-20062006"><font color="#0000ff"
 face="Arial" size="2">Thanks,</font></span></div>
    <div><span class="589102510-20062006"><font color="#0000ff"
 face="Arial" size="2">ilker</font></span></div>
    <title></title>
C "-//W3C//DTD HTML 4.0 Transitional//EN"&gt;
    <meta content="MSHTML 6.00.2900.2838" name="GENERATOR">
    <div dir="ltr" align="left"><span class="970384110-20062006"><font
 color="#0000ff" face="Arial" size="2">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.</font></span></div>
    <div dir="ltr" align="left"><span class="970384110-20062006"></span> </div>
    <div dir="ltr" align="left"><span class="970384110-20062006"><font
 color="#0000ff" face="Arial" size="2">what do you mean by RFC1918
addresses ?</font></span></div>
    <div dir="ltr" align="left"><span class="970384110-20062006"></span> </div>
    <div dir="ltr" align="left"><span class="970384110-20062006"><font
 color="#0000ff" face="Arial" size="2">Thanks,</font></span></div>
    <div dir="ltr" align="left"><span class="970384110-20062006"><font
 color="#0000ff" face="Arial" size="2">ilker</font></span></div>
    <br>
    <div class="OutlookMessageHeader" dir="ltr" align="left"
 lang="en-us">
    <hr tabindex="-1"><font face="Tahoma" size="2"><b>From:</b> Greger
V. Teigre [<a class="moz-txt-link-freetext" href="mailto:greger@teigre.com">mailto:greger@teigre.com</a>] <br>
    <b>Sent:</b> Tuesday, June 20, 2006 1:40 PM<br>
    <b>To:</b> İlker Aktuna (Koç.net)<br>
    <b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:serusers@iptel.org">serusers@iptel.org</a><br>
    <b>Subject:</b> Re: [Serusers] checking source ip and dest ip<br>
    </font><br>
    </div>
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. <br>
The problem has already been solved, why not reuse? ;-)<br>
g-)<br>
    <br>
İlker Aktuna (Koç.net) wrote:
    <blockquote
 cite="mid7EB6E3B0D22DF54585D1CEB9642E3198D85C7A@owa.koc.net"
 type="cite">
      <meta http-equiv="EXPIRES" content="0">
      <meta http-equiv="EXPIRESABSOLUTE"
 content="Tue, 01 Jun 1999 12:00:00 GMT">
      <meta http-equiv="PRAGMA" content="NO-CACHE">
      <meta http-equiv="CACHE-CONTROL" content="PRIVATE">
      <meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
      <meta content="MSHTML 6.00.2900.2838" name="GENERATOR">
      <div>
      <div><span class="589102510-20062006"><font color="#0000ff"
 face="Arial" size="2">Hi,</font></span></div>
      <div><span class="589102510-20062006"></span> </div>
      <div><span class="589102510-20062006"><font color="#0000ff"
 face="Arial" size="2">I need to check source ip of a SIP message and
also destination IP to which the message will be sent.</font></span></div>
      <div><span class="589102510-20062006"><font color="#0000ff"
 face="Arial" size="2">i.e. I will use mediaproxy only if the one of
the ip addresses match 10.0.0.0 / 255.0.0.0</font></span></div>
      <div><span class="589102510-20062006"></span> </div>
      <div><span class="589102510-20062006"><font color="#0000ff"
 face="Arial" size="2">is it possible ?</font></span></div>
      <div><span class="589102510-20062006"></span> </div>
      <div><span class="589102510-20062006"><font color="#0000ff"
 face="Arial" size="2">Thanks,</font></span></div>
      <div><span class="589102510-20062006"><font color="#0000ff"
 face="Arial" size="2">ilker</font></span></div>
<!--445D5241795C--></div>
    </blockquote>
<!--445D5241795C-->
    <br>
    <br>
    <a
 href="http://387555.sigclick.mailinfo.com/sigclick/02090600/07064D00/01080049/0011115231.jpg"><img
 moz-do-not-send="true"
 src="http://387555.signature1.mailinfo.com/confirm2.6/02090600/07064D00/01080049/0011115231.jpg"
 nosend="1" border="0"></a><!--445D5241795C//--></div>
    <div style="font-size: 7pt; color: gray; font-family: verdana;">
    <div style="font-size: 7pt; color: gray; font-family: verdana;">
    <div style="font-size: 7pt; color: gray; font-family: verdana;">_____________________________________________________________________________________________________________________________________________</div>
    <div style="font-size: 7pt; color: gray; font-family: verdana;">Bu
e-posta mesaji kisiye ozel olup, gizli bilgiler iceriyor olabilir. Eger
bu e-posta mesaji size yanlislikla ulasmissa,  icerigini hic bir
sekilde kullanmayiniz ve ekli dosyalari acmayiniz. Bu durumda lutfen
e-posta mesajini kullaniciya hemen geri gonderiniz  ve  tum kopyalarini
mesaj kutunuzdan siliniz. Bu e-posta mesaji, hic bir sekilde, herhangi
bir amac icin cogaltilamaz, yayinlanamaz ve para karsiligi satilamaz. 
Bu e-posta mesaji viruslere karsi anti-virus sistemleri tarafindan
taranmistir. Ancak yollayici, bu e-posta mesajinin - virus koruma
sistemleri ile kontrol ediliyor olsa bile - virus icermedigini garanti
etmez ve meydana gelebilecek zararlardan dogacak hicbir sorumlulugu
kabul etmez. </div>
    <div style="font-size: 7pt; color: gray; font-family: verdana;">This
message is intended solely for the use of the individual or entity to
whom it is addressed , and may contain confidential  information. If
you are not the intended recipient of this message or you receive this
mail in error, you should refrain from making any use of the contents
and from opening any attachment. In that case, please notify the sender
immediately and return the message to the sender, then, delete and
destroy all copies. This e-mail message, can not be copied, published
or sold for any reason. This e-mail message has been swept by
anti-virus systems for the presence of computer viruses. In doing so,
however,  sender  cannot warrant that virus or other forms of data
corruption may not be present and do not take any responsibility in any
occurrence.</div>
    <div style="font-size: 7pt; color: gray; font-family: verdana;">_____________________________________________________________________________________________________________________________________________</div>
    <div style="font-size: 7pt; color: gray; font-family: verdana;"
 align="justify"></div>
    </div>
    </div>
  </blockquote>
  </div>
</blockquote>
</body>
</html>