> -----Original Message-----
> From: Ronneil Camara [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, May 20, 2000 11:38 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: [plug]OT:killing non-active ip address
>
>
> > -----Original Message-----
> > From: fooler [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, May 20, 2000 11:35 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [plug]OT:killing non-active ip address
> >
> >
> > ----- Original Message -----
> > From: "Ronneil Camara" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, May 20, 2000 06:31 PM
> > Subject: [plug]OT:killing non-active ip address
> >
> >
> > hi ronneil,
> >
> > is this a dial-up or lan user?
>
> Both. For the dial-up access, I have assigned different ip
> address on the
> port so it acts like a lan workstation too.
Wait, I got confused with your question. If you are asking what type of
clients are accessing the internet via squid, the answer is both. Here is my
setup.
Internet<-----ISP<----squid-----192.168.1.0 subnet--------lan
| |-----192.168.2.0 subnet--------lan
|--------192.168.3.0 subnet--------lan
We have an access server in each of the subnets.
The php scripts I've created doesn't care whether you are a lan ws or
dial-up ws.
Again, here is what I would like to happen. Let say I've got a file
/etc/squid/ipaddress.
If a user would like to browse, he will have to go to the php webpage for
authentication by mysql. If he is successful, the php script adds the ip
address of the successful user to /etc/squid/ipaddress. Then I have a cron
script scheduled as * * * * *, which compares /etc/squid/ipaddress with
/etc/squid/ipaddress.old. If equal, the bash script doesn't send a reload to
squid. But if it is not, then the bash script, sends a reload to squid. The
drawback with this type of setup is that the user have to wait for 1 minute
for changes in acl to take effect. Pero ok lang yon.
The /etc/squid/ipaddress is saved this way by addip.php3
192.168.1.10
192.168.2.10
192.168.1.50
192.168.3.127
Don't worry about the sorting, there's no need.
Let say that user 192.168.1.10 logout using the php script,
/etc/squid/ipaddress will be updated by removeip.php3 then cron does the job
again. So the file looks like this now:
After logout of 192.168.1.10, /etc/squid/ipaddress is saved this way by
removeip.php3
192.168.2.10
192.168.1.50
192.168.3.127
What if 192.168.1.50 didn't log out using the php webpage and turned off his
pc? The /etc/squid/ipaddress stays the same. So I'm trying to find a
solution to remove an ip address in tombstone state, in this case,
192.168.1.50 is in tombstone state.
I guess the perl gurus here can help me. :-)
Someone told me to edit this perl but I couldn't comprehend it. I know it's
ping and it has loop also. But I don't know where to specify the file.
perl -nle 'print if system("ping -c 3 $_ > /dev/null") >> 8 == 0'
-
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]