Re: lug-bg: squid message ?
- Subject: Re: lug-bg: squid message ?
- From: t.yankov@xxxxxxxxxxxxx (Tosho Yankov)
- Date: Thu, 30 Jan 2003 11:14:56 +0200
Thursday, January 30, 2003, 4:19:17 PM, you wrote:
r> Iskam da naprawq slednoto nesto, ako nqkoi se opita da poseti opredelen ip-address obache go accesswa prez proxito... de ne mu dawa da go accessne ami da mu izwede edno syobshtenie da si izkluchi
r> wremenno proxito za tozi adres ili da go slovi w Exception-lista..
ednos scriptche koeto prihvasta IP/imenata na tezi sites i redirectva
kym edna tvoq stranichka na tvoq http kak i kakvo da napravqt za da
mahnat proxy za tezi stranici
eto ti primer za script:
#!/usr/bin/perl
$|=1;
while (<>) {
@X = split;
@user = split(/\./,$X[1]);
chop($user[3]);
chop($user[3]);
if($X[0] =~ /domain.com/i || /comain2.com/i) {
s/$X[0]/http:\/\/www.tvoqhost.com\/obqsnenie.html/;
}
print;
}
posle v squid.conf
redirect_program /usr/local/squid/etc/redirect.pl
redirect_children 10
redirect_rewrites_host_header on
ili drugiq variant s proxy.pac na users i veche ot tam ti da kazvash
koe e DIRECT i koe prez proxy
--
Best regards,
Tosho Yankov
Support engineer
S&T Bulgaria e.o.o.d.
Tel.: (+359 52) 602 510
(+359 52) 630 991
Fax.: (+359 52) 630 991
Mobile: (+359 88) 987 720
mailto:t.yankov@xxxxxxxxxxxxx
============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================
|