Hi all,
I search for a simple way to match src_ip from 192.168.1.6 - 192.168.1.11.
Any ideas, the following aren't working :-( ...
if(src_ip==192.168.1.[6-11]) if(src_ip==192.168.1.[6|7|8|9|10|11])
thanks, Andreas
Hello,
On Thu, Jan 31, 2008 at 07:46:25AM +0100, Andreas Heise wrote:
I search for a simple way to match src_ip from 192.168.1.6 - 192.168.1.11.
Any ideas, the following aren't working :-( ...
if(src_ip==192.168.1.[6-11]) if(src_ip==192.168.1.[6|7|8|9|10|11])
You can use src_ip matching with subnet/mask syntax:
src_ip==192.168.1.8/30 # matched ips 8,9,10,11
You just need to split your IPs into subnet ranges and then enumerate them with "||" (or).
SAL
El Jueves, 31 de Enero de 2008, Andreas Heise escribió:
Hi all,
I search for a simple way to match src_ip from 192.168.1.6 - 192.168.1.11.
Any ideas, the following aren't working :-( ...
if(src_ip==192.168.1.[6-11]) if(src_ip==192.168.1.[6|7|8|9|10|11])
if($si =~ "192.168.1.[6|7|8|9|10|11]")
Regular expressions are matched with =~ instead of ==. And don't forget " ".
;)
On Thu, Jan 31, 2008 at 04:09:54PM +0100, Iñaki Baz Castillo wrote:
El Jueves, 31 de Enero de 2008, Andreas Heise escribió:
I search for a simple way to match src_ip from 192.168.1.6 - 192.168.1.11.
Any ideas, the following aren't working :-( ...
if(src_ip==192.168.1.[6-11]) if(src_ip==192.168.1.[6|7|8|9|10|11])
if($si =~ "192.168.1.[6|7|8|9|10|11]")
And fix your regular expression to something like this: "^192.168.1.([6789]|10|11)$" to match what you need and no anything else. :-)
Regular expressions are matched with =~ instead of ==. And don't forget " ".
SAL
El Jueves, 31 de Enero de 2008, Jan ONDREJ (SAL) escribió:
On Thu, Jan 31, 2008 at 04:09:54PM +0100, Iñaki Baz Castillo wrote:
El Jueves, 31 de Enero de 2008, Andreas Heise escribió:
I search for a simple way to match src_ip from 192.168.1.6 - 192.168.1.11.
Any ideas, the following aren't working :-( ...
if(src_ip==192.168.1.[6-11]) if(src_ip==192.168.1.[6|7|8|9|10|11])
if($si =~ "192.168.1.[6|7|8|9|10|11]")
And fix your regular expression to something like this: "^192.168.1.([6789]|10|11)$" to match what you need and no anything else. :-)
Yes, I forgot it ;)
Jan ONDREJ (SAL) schrieb:
On Thu, Jan 31, 2008 at 04:09:54PM +0100, Iñaki Baz Castillo wrote:
El Jueves, 31 de Enero de 2008, Andreas Heise escribió:
I search for a simple way to match src_ip from 192.168.1.6 - 192.168.1.11.
Any ideas, the following aren't working :-( ...
if(src_ip==192.168.1.[6-11]) if(src_ip==192.168.1.[6|7|8|9|10|11])
if($si =~ "192.168.1.[6|7|8|9|10|11]")
And fix your regular expression to something like this: "^192.168.1.([6789]|10|11)$" to match what you need and no anything else. :-)
Regular expressions are matched with =~ instead of ==. And don't forget " ".
SAL
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
great, thanks!