★ wanayoo — archive 1999 http://aaron.marasco.com/linux.htmlNouvelle recherche | Portail wanayoo
Aaron's Linux Scripts
fireparse net-check
Download
fireparse
"fireparse" is a perl script that is executed daily that e-mails a report of all packets that have been logged by the v2.2.x kernel's ipchains packet filtering subsystem.
The report includes source and destination ports, direction, packet count, ipchains rule, and fully resolved host name (if available).
The e-mail report can be formatted plain text or a colored HTML table.
fireparse also moves all ipchains entries from your syslog file into a second message file so that other syslog entries are more easily noticed and recognized.

A Sample:
Automated Firewall Packet Log Report
DateChainRuleActionQtyExt. AddressIFaceExt ProtocolInt Protocol
May 03forward14MASQ16-> 141.157.98.27ppp060206/tcp1033/tcp
adsl-141-157-98-27.bellatlantic.net
May 03forward14MASQ14-> 207.114.1.117ppp09739/tcp1051/tcp
pm3-s47.dial-up.abs.net
May 03forward14MASQ64-> 172.143.180.222ppp03854/tcp1085/tcp
May 03forward14MASQ11-> 141.157.98.27ppp060205/tcp1187/tcp
adsl-141-157-98-27.bellatlantic.net
May 03forward14MASQ26-> 207.114.1.41ppp01166/tcp18899/tcp
pm2-s01.dial-up.abs.net
May 03forward14MASQ14-> 141.157.98.27ppp063010/tcp22720/tcp
adsl-141-157-98-27.bellatlantic.net
May 03forward14MASQ24-> 172.143.180.222ppp01060/tcp22720/tcp
AC8FB4DE.ipt.aol.com
May 03forward14MASQ88-> 162.33.174.226ppp01056/tcp28599/tcp
May 03reserved2DENY1<- 210.97.123.3ppp00/tcppop2
May 04forward14MASQ1-> 207.46.130.161ppp00/icmpecho-req
May 04forward14MASQ87-> 207.114.1.41ppp01166/tcp18899/tcp
pm2-s01.dial-up.abs.net
Download
net-check
The "net-check" package is a pair of simple perl scripts that will monitor and report on your internet connectivity.
The scripts came about when my DSL provider repeatedly dropped the connections on a machine that was used exclusively as a dial-up gateway.
In addition, since I am spending $50 a month for my internet connection, I want to make sure I get what I paid for.

A Sample:
To: user@isp.net
Subject: Automated Network Checks Report 

Last month, there were 64.25 hours of downtime out of 720 possible hours.
(There were only 2692 out of 2880 possible samples made.)
Last month's ratio was 0.089 so your bill should be $45.53.

--------------------------------------------------------------------------------

1 : 2 hr
2 : 22 hr
3 : 0.5 hr
4 : 1.25 hr
5 : 1.75 hr
6 : 0.25 hr
7 : 0.25 hr
8 : 0.25 hr
9 : 1.25 hr
10 : 3.25 hr
11 : 1.25 hr
13 : 0.25 hr
14 : 1.75 hr
15 : 0.25 hr
16 : 0.75 hr
17 : 0.75 hr
18 : 8.5 hr
19 : 0.75 hr
20 : 11.5 hr
21 : 0.75 hr
22 : 0.75 hr
23 : 1.75 hr
24 : 2 hr
25 : 0.25 hr
27 : 0.25 hr