HTTP Restricted Access

Kostas Lialiambis root at edessa.topo.auth.gr
Tue Nov 25 22:29:24 EET 1997


simos at athena.teiath.gr wrote in message ...

>> >Mporeis na peiramatisteis me to traffic shaper tou pyrina 2.1.x.
>> >Me to traffic shaper orizeis to megisto bandwidth enos interface,
>>
>> erothsh. poy mporo na bro to traffic shaper
>Ypostiriji yparxei se pyrina 2.1.x (2.1.65).

Alh8eia, bre Simo, to exei deis ka8oloy ayto to feature (egw kapws dyskolo
ma to dw mia kai einai megalh apofash na perasw sto 2.1.XX etsi apotoma).
Koitazontas kai ena allo boh8htiko (enan limiter gia ton apache poy einai
external module) eida oti h apopsh toy "traffic limit" einai poly
diaforetikh apo programmatisth se programmatisth. Egw p.x. 8elw na perisw to
traffic p.x. se maximum 30MB per site per day. Omws to limit module toy
apache (gia paradeigma) periorize apla to outbound traffic apo ta
public_dirs twn users toy systhmatos (kammia sxesh m' ayto poy h8ela). Gi'
ayto eimai epifylaktikos me tis etoimes lyseis.

O Ricudis moy proteine na kanw ena tcp wrapper (les kai o programmatismos
kati tetoioy einai ypo8esh merikwn wrwn gia mena). Telos pantwn, egw me
xairomai oti koytsa straba dinw panta lysh, m' ayta ta liga poy 3erw, asxeta
an h lysh einai koyfh. P.x. sto sygkekrimeno problhma, opws eipa, akribws
sto shmeio poy o httpd exei anoi3ei to connection  alla prin kanei process
to request, ton ebala na ektelei:

system("ipfwadm -I -i deny -S $(getpeername %d|tail -1)/32 -D 0.0.0.0/0
80 -P tcp -y");

opoy %d to connection poy prepei na perasei san parametro sthn diatagh
/usr/bin/getpeername (h opoia epistrefei mia grammh me to socket kai mia
grammh me to ip to remote host). Etsi o remote host firewalliazetai alla
epeidh hdh exei anoi3ei ena connection ayto mporei na metaferei sthn
synexeia to arxiko request toy.

Einai 8eokoyfo alla... IT WORKS! (yeah!!)

Kor.


--
====================================================================
Gia na mathete pos na xrisimopoiite ton majordomo, stilte e-mail
sto "majordomo at argos.hol.gr" me 1 grammi sto keimeno: help
Ta archives tis listas einai sto http://www.argos.hol.gr/lists
Gia opoiodipote problima stilte  e-mail ston owner-linux-greek-users
====================================================================



More information about the Linux-greek-users mailing list