Blog |Follow Nick on Twitter| About
 

I use stuff like show run | inc abc all the time but I've never really dabbled with plumbing regex through it, I played a little today. Here's a couple of examples you might find useful:

Look for either https or www in an access-list

FW01/pri/act# show run access-list inside | inc (https|www) 
access-list inside extended permit tcp object inside any4 eq www 
access-list inside extended permit tcp object inside any4 eq https

Look for either 10.10.1.91 or 10.10.1.92 in an access-list

FW01/pri/act# show access-list inside | inc 10.10.1.(91|92)
  access-list inside line 8 extended permit udp host 10.10.1.91 host 10.1.2.199 eq 1001 (hitcnt=0) 0xd0cd20cd 
  access-list inside line 8 extended permit udp host 10.10.1.91 host 10.1.2.200 eq 1001 (hitcnt=0) 0xf94e6d62 
  access-list inside line 8 extended permit udp host 10.10.1.92 host 10.1.2.199 eq 1001 (hitcnt=0) 0x0bced66c 
  access-list inside line 8 extended permit udp host 10.10.1.92 host 10.1.2.200 eq 1001 (hitcnt=0) 0x9ceae405

There's loads that can be done, google is your friend.

rgds,

Nick

 
Nick Bettison ©