[Serusers] checking source ip and dest ip

samuel samu60 at gmail.com
Thu Jun 22 09:33:53 CEST 2006


 (uri=~"^.*@10\.22[45]\..*" || .....)


2006/6/21, İlker Aktuna (Koç. net) <ilkera at koc.net>:
>
>
>
> Thank you; that was what I'm looking for.
>
> How can I match i.e IP block 10.224.0.0 - 10.255.255.255 ?
> Is there an easy way or should I list them with || as in :
>
>  (uri=~"^.*@10\.224\..*" ||  uri=~"^.*@10\.225\..*" || .....)
>
> Thanks,
> ilker
>
>  ________________________________
>  From: Greger V. Teigre [mailto:greger at teigre.com]
> Sent: Wednesday, June 21, 2006 12:50 PM
>
> To: İlker Aktuna (Koç.net)
> Cc: serusers at iptel.org
> Subject: Re: [Serusers] checking source ip and dest ip
>
>
> Check the request uri after lookup, right before t_relay().
> (uri=~"^.*@10\..*") As long as you don't have nated clients (and thus don't
> use fix_nated_register()) the request uri will contain the actual IP
> address.
> g-)
>
> İlker Aktuna (Koç.net) wrote:
>
>
> 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
>
>  ________________________________
>  From: Greger V. Teigre [mailto:greger at teigre.com]
> Sent: Tuesday, June 20, 2006 10:26 PM
> To: İlker Aktuna (Koç.net)
> Cc: serusers at iptel.org
> Subject: Re: [Serusers] checking source ip and dest ip
>
> 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).
> 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
>
>  ________________________________
>  From: Greger V. Teigre [mailto:greger at teigre.com]
> Sent: Tuesday, June 20, 2006 1:40 PM
> To: İlker Aktuna (Koç.net)
> Cc: serusers at iptel.org
> Subject: Re: [Serusers] checking source ip and dest ip
>
> 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.
> 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.0
>
> is 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
>
>  ________________________________
>  From: Greger V. Teigre [mailto:greger at teigre.com]
> Sent: Tuesday, June 20, 2006 1:40 PM
> To: İlker Aktuna (Koç.net)
> Cc: serusers at iptel.org
> Subject: Re: [Serusers] checking source ip and dest ip
>
> 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.
> 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.0
>
> is 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
>
>  ________________________________
>  From: Greger V. Teigre [mailto:greger at teigre.com]
> Sent: Tuesday, June 20, 2006 10:26 PM
> To: İlker Aktuna (Koç.net)
> Cc: serusers at iptel.org
> Subject: Re: [Serusers] checking source ip and dest ip
>
> 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).
> 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
>
>  ________________________________
>  From: Greger V. Teigre [mailto:greger at teigre.com]
> Sent: Tuesday, June 20, 2006 1:40 PM
> To: İlker Aktuna (Koç.net)
> Cc: serusers at iptel.org
> Subject: Re: [Serusers] checking source ip and dest ip
>
> 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.
> 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.0
>
> is 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
>
>
>
>
>
>
>
>
> _____________________________________________________________________________________________________________________________________________
> 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.
> 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.
> _____________________________________________________________________________________________________________________________________________
>
> _______________________________________________
> Serusers mailing list
> Serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>
>
>


More information about the sr-users mailing list