Security

last person joined: yesterday 

Forum to discuss Enterprise security using HPE Aruba Networking NAC solutions (ClearPass), Introspect, VIA, 360 Security Exchange, Extensions, and Policy Enforcement Firewall (PEF).
Expand all | Collapse all

Creating a ClearPass regex for an IP address

This thread has been viewed 7 times
  • 1.  Creating a ClearPass regex for an IP address

    Posted Apr 14, 2014 02:01 PM

    I am trying to create a Network Device Group in CPPM where the device IP addresses will match a regular expression.

    The devices in the Group will have a common first and third octet. The second and fourth octet will vary.

     

    eg.  192.xxx.100.yyy

     

    I have no experience with regular expressions but I think this might work.

     

    ^192(.[0-9]*){3}(.)100(.[0-9]*){3}$

     

     



  • 2.  RE: Creating a ClearPass regex for an IP address
    Best Answer

    Posted Apr 22, 2014 09:59 AM

    The regex you proposed would allow 192.999.100.999, which isn't a valid address (obviously). A quick google search found this, which looks like it would be useful: http://answers.oreilly.com/topic/318-how-to-match-ipv4-addresses-with-regular-expressions/



  • 3.  RE: Creating a ClearPass regex for an IP address
    Best Answer

    Posted Apr 23, 2014 10:02 AM

    Thanks Ryan,

     

    The document you pointed out gave me a push in the right direction.

    From it and a couple of other regex cheat sheets I was able to configure and test the following

     

    ^192\.([0-9]{1,3})\.100\.([0-9]{1,3})$

     

    matches on all ip addresses in the form of 192.xxx.100.yyy