We have this regex:\\*.*?(.600[0-9]).*?.(LISTEN|ESTABLISHED)
OS = Solaris 10
The purpose of this regex is to match the ports in output of "netstat -an" and report if any ports between 6000-6009 are getting used. The only problem is if I have something like this (sample output as mentioned below), the regex matches everything with 6000 in it. It matches 46000, 60006 and 6000. Because of that we are getting faulty alerts. How can we fix this to just ONLY pick up ports (6000-6009)? Please help.
10.10.10.10.2055 10.10.4.10.60006 49552 0 49552 0 ESTABLISHED
10.10.10.10.6360 10.10.4.10.6000 65290 0 49640 0 LISTEN
10.10.10.10.2044 10.10.4.10.46000 49552 0 49552 0 ESTABLISHED