Symantec IT Risk and Compliance Product Group

 View Only
Expand all | Collapse all

Need to Create Check for only 1 IP Address

  • 1.  Need to Create Check for only 1 IP Address

    Posted Feb 25, 2011 11:44 AM

    Hello,

     

    I need to create a check that will pass if a UNIX machine only has one IP address assigned to an interface and fail if it has more than one.  I have tried multiple regular expressions but they pass or fail no matter how many ip addresses they have.  Some examples of what I have tried are below.  I am using the Machine category and the IP Addresses field in the check builder.  I have tried the =~ and %~ operators too.  Does anyone have any ideas for me?  Thanks.

    (?:\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b)?

    (?:\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b){1}

    (\b(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\b){1}

     

     



  • 2.  RE: Need to Create Check for only 1 IP Address

    Posted Mar 22, 2011 08:15 AM

    I will try  and  update  you...