Greetings to all at Perlmonks,
I have a log file from a Pix firewall the record of the syslog looks like this:
2006-03-20 00:02:48,Local4.Warning,1.1.1.10,Mar 19 2006 23:56:32: %PIX-4-106023: Deny udp src inside:1.1.1.1/1161 dst outside:2.2.2.2/53 by access-group "inside_access_in".In the syslog file there are mutiple instances of the same src ip address with different or the same dst address's. I am not interested in the src port.
I need to sort the file so that I can have a report based on src IP address with all the associated dst IP address's,dst port,src interface and dst interface.
I prsume(not too sure)the best structure would be an array of arrays - I can get the data from the syslog file into the array and strip the(/ : , ") out of it but have no idea how to sort into the format I need. Any help with this would be really apprciated as once I can understand how to do this I have a number of other projects I would be able to do based on the same kind of thing. I can mail the syslog file if it would help.
Thanks
Pierre
Formatting added by GrandFather
In reply to Sorting log files with IP addresses (duplicates) by Secode
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |