Gia traffic dedomenwn

Lucas Maneos lm at iii.co.uk
Mon Feb 17 19:11:17 EET 1997


> > Yparxei kaneis sthn lista poy na exei doylepsei to "ipfwadm" gia na mporei
> > na blepei to traffic twn dedomenwn poy feygoyn kai erxontai apo to host toy;

>   To exw doulepsei alla mono gia firewalling kai kopsimo "ponirwn"
> protokolwn (p.x. icmp). Alla nomizw oti ean valeis to -A mporeis meta apo
> to /proc/net/den_thimamai_ti_allo na diavaseis to traffic sou.

Xm.... poia akribvs ICMP packets kobeis, kai giati;

Sto [firewall/proxy] mhxanhma edv xrhsimopoiv to parakatv scripaki (se cron
job):

- ----------------------------cut here-------------------------->8-------------
#!/bin/sh
/sbin/ipfwadm -Alen | \
        /usr/bin/tail +3 | \
        /usr/bin/awk '{ print $1 " " $2 " " $3 " " $7 }' | \
        /usr/bin/logger -t "IPACCT"

ALL=0.0.0.0/0
OUT=123.123.123.123
IN=123.123.123.124
PENDING=123.123.123.125

/sbin/ipfwadm -A -f
/sbin/ipfwadm -A in  -a -P all -V $PENDING -S $ALL -D $ALL
/sbin/ipfwadm -A out -a -P all -V $PENDING -S $ALL -D $ALL
/sbin/ipfwadm -A in  -a -P all -V $OUT -S $ALL -D $ALL
/sbin/ipfwadm -A out -a -P all -V $OUT -S $ALL -D $ALL
/sbin/ipfwadm -A in  -a -P all -V $IN -S $ALL -D $ALL
/sbin/ipfwadm -A out -a -P all -V $IN -S $ALL -D $ALL

- ----------------------------cut here-------------------------->8-------------

To sygkekrimeno koyti exei tria NICs (in/out/pending ;-)), kai oi IP d/nseis
fysika den einai aytes poy fainontai parapanv.

Ta stats phgainoyn mesv syslogd ston loghost, ap'opoy allo script ta
petaei se CSV (Comma Separated Values) arxeio, to opoio mporei na ypostei
peretairv epejergasia se opoiodhpote spreadsheet/database/whatever.

Kapoia stigmh ua huela na brv to xrono na to epekteinv ligaki, vste na
exv pio leptomerh logs (px ana protocol, ana client klp klp).

Sto spiti, xrhsimopoiv diald sto gateway-linuxokoyto, o opoios krataei
dika toy logs me diafores xrhsimes plhrofories (ti vra shkvse th
grammh, ti vra thn katebase, diarkeia klhshs, ariumos paketvn in/out
kai ariumos bytes in/out)

HTH
L.
==================================================================
For help on using this list (linux-greek-users), send a message to
"majordomo at argeas.argos.hol.gr" with one line of text: "help".
For any problem send e-mail to owner-linux-greek-users
==================================================================



More information about the Linux-greek-users mailing list