Metered HTTP Proxy?
Jon asks: "My brother-in-law has three teenage daughters. The only thing that he has to hold over their head is being online. I am trying to find him an HTTP proxy server that has metering built in. I started with Squid which has the authentication stuff in it but we would like something where we could allocate minutes, like some of the WiFi stuff you encounter at a hot spot."
My requirements:
- need to be able to limit each daughter to e.g. 1Gb of traffic. Once they hit that, bzzt, no more Internet access till next month. After that, they can either experience the joys of 28kb/s downloading or grovel at someone's feet to let them browse under another login id
- each daughter needs to be able to check how much Internet "allowance" she has left
- need to be able to limit use to a specific period of the day. With holidays coming up, I don't want them to be sitting in their rooms all day chatting... Ideally, I'd be able to block out individual sites (e.g. MSN) while leaving other stuff untouched
- need to be able to block out the most noxious sites. For some reason, teenage girls can't seem to resist downloading crapware if it calls itself "PicOfGoodCharlotte.exe" or something similar...
Yep, I'm aware that I could set up something that does most/all of this, but frankly there's not enough hours in the day at present to do so.
My brother-in-law has three teenage daughters. The only thing that he has to hold over their head is being online.
I don't think so. There are a lot simpler carrots and sticks available, in order of decreasing importance to the average teenage girl:
1) Telephone privs - no cell phone for you
2) Grounding - no hanging out at the mall for you
3) Allowance - no buying the latest MTV-hyped fad product for you
4) Television privs - no watching MTV-hyped commercials-as-content for you
5) Driving privs - no freedom to move about for you
6) Food - no bulemia practice for you
When information is power, privacy is freedom.
Have you considered OpenBSD's Authpf? Here's the description and man page.
It runs on an OpenBSD firewall (which may be a pain for you; not sure what you've got installed already).
Anyway, what it does is it prevents packets from flowing UNLESS the user has authenticated to the firewall via an ssh session. From there, the packets are tagged as belonging to the user, and you can deal with a particular user's packets as you wish (prioritize, block, redirect, etc).
If you could apply standard login controls (amount of time, time of day, etc), then you can effectively limit access to the internet with the same granularity...
I realize that parents don't want their kid on the internet all the time, and like to encourage other acitivities, but why resort to something like this? It seems to me that the better idea would be to actually talk to the kids when it seems like they've been spending too much time online. Arbitrary rules like this only make kids see parents as a rival, and rules like this as something to try to get around, intstead of a reasonable guideline from people with more life experience.
Famous Last Words: "hmm...wikipedia says it's edible"
Dude - has your brother-in-law considered a non-technological alternative? He could try (drum-roll please) treating his daughters like human beings. Because if he's concentrating his efforts on how to control and punish them, maybe he should leave home and get a dog.
I have discovered a truly remarkable
Here's what my parents used for me, back in my BBS days:
"Get off the computer. Now."
If you were on the computer when you weren't supposed to, the phone cord from the computer to the wall would dissappear. Eventually they found the phone cord I bought at the hardware store, then the damn wall jack dissappeared.
...is being online.
Wow. That's quite the predicament. The only thing he can do as reward/punishment is control their net access. The. Only. Thing.
Makes one yearn for the good old days, when a parent was able to say "no" to borrowing the car, going on a date, purchasing the latest trendy thing, watching television, or assigning extra chores.
--
Don't like it? Respond with words, not karma.
It can't be bought in stores, it can only be evolved from within, but its the best thing for building character within oneself and one's children.
Enough other posters have said that the principle behind this is a bad idea, so instead of reiterating that, I'm going to comment on the technical method of metering HTTP usage.
First, if it's just time restrictions, you can probably use your router's features. My router's setup page lets me block access from an IP range to a port range between a time range; I've used this to block a spam daemon on my mom's computer from getting to port 25 [yes, this blocked normal e-mail], or to block myself from wasting time past 7PM.
Barring that, I'd suggest writing your own server, or getting someone to do so for you. An HTTP server and a client are not hard to write; I wrote them in about a week of classtime each (got bored in my programming class). Or you can simply put a Perl script together that uses standard modules. Once you have a client and a server, it's a simple matter to tie them together, totaling the number of bytes transferred into a variable/disk file.
On a completely unrelated and stupid-sounding idea: does Apache stop serving when it can't write to log files? If so, just make it log proxy requests to a floppy disk.
I too, use access to the internet as a carrot (or stick) over my kids head. It works well. They want to be on line 14 hrs a day, which I feel is unreasonable.
However, metering them x hours per day of usage or x GBs of IO doesn't seem practical. It could lead to many arguments and hair splitting about how much they were really on.
I mean, how do you measure it? Do I measure the time a socket is connected? If they open the NYtimes and walk away from their desk, they will eat up their meter. Do I measure bandwidth usage. Say they download 2 movies one day, poof metering over. All this would lead to mush complaining and gnashing of teeth. It would also lead to them using the internet when I don't want them to.
Instead, I set my router to disconnect them by script during the hours I don't want them on the internet.
My kids loose the internet 1 hour before bed, and during weekend days. During the summer, I limit them to different hours.
If they give me grief, I take an hour off at night . Surprisingly, even an hour is plenty of stick to get my kids to behave.
If you don't have a router, make a cheap one out of an old PC with Linux. Easy to setup and script. (I'm actually using W2K Ad. Server as a router and scripting their access using netsh.)
I have no qualms about using the internet to keep my kids in line, and I sleep better at night knowing they can't get up and start surfing instead of getting a good nights sleep.
machinator omnis sine licentia
What if they are not just waisting time using IM, Chat, etc.? What if they are working on a project. When I was in high school I had many projects that required me to pull late nites on the computer using the internet for research. It is not fair to set a static limit for internet access. Just be a parent. How hard is it to say turn off the computer? If that is too hard just unplug it. Just because they don't have internet access doesn't mean they are going to abandon the computer, games are a great distraction.
http://www.softforyou.com/ip-index.html
http://www.akrontech.com/
So if OpenBSD is a firewall box, you control the incoming packets on the internal NIC--redirect all incoming port 80 to 3128: squid as transparent proxy. http://www.benzedrine.cx/transquid.html
Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
Static time restrictions make sense. If they REALLY need access after hours for a school project: Demand documentation: i.e. a project outline from a teacher (including a due date, so extended hours will cease on that date, if they go overtime, tough). If sufficient documentation isn't available, tell them "tough luck, better off researching rather than IM'ing"
Logistical Chaos Officer http://www.slagg.org - LAN Gaming in Sarasota FL,USA
The only thing that he has to hold over their head is being online.
That is, parenting where you actually CHECK what the kids do, and keep track within your head how long they've been sitting on their boxen???
They know how to take my router off the network and reboot the cable modem to clear its MAC limit if they ever needed to bypass any protection I've set up on the router.
Dont put anything past teenagers. They're alot
smarter than most people give them credit for.
My oldest will have CCNA before he graduates HS.
I work from home semi-regularly, and my broadband connection is my lifeblood at those times. For a variety of reasons, the in-laws visit fairly regularly. My father-in-law doesn't travel anywhere without his laptop, and since he's without broadband where he lives, he takes every opportunity to suck my connection dry by downloading every latest Linux ISO image he can find -- which really blows when I'm trying to get serious work done. I'd really love to be able to throttle his bandwidth down to sub dial-up speeds during my normal working hours.
(Ok, before everyone starts pinging me for not to him about it: I DID. HE DIDN'T GET IT.)