Koozali.org: home of the SME Server

Internet

Tyrone Miles

Internet
« on: September 05, 2003, 10:17:50 AM »
Is there a way to set your server up to only allow people to connect to the internet at set times?

My brother stays up too late at night on the net so I want to set it to cut him off at say 10:30 PM every night based on his IP address.

:-)

Mike

Re: Internet
« Reply #1 on: September 05, 2003, 11:50:29 AM »
try it in squid.... acl time

Tyrone Miles

Re: Internet
« Reply #2 on: September 05, 2003, 06:53:50 PM »
Thanks for the help. :-)

Are there any directions on how to configure this in e-smith. Has anyone made server manager plugins for squid?

Alejandro

Re: Internet
« Reply #3 on: September 06, 2003, 07:14:18 PM »
Tyrone: I found this
http://squid.visolve.com/squid24s1/access_controls.htm

maybe  you could write a "acl time" comand in a file like:
......./custom-templates/etc/squid/squid.conf/ "nn-acl-timectrl" and do the expand templates thing to get it configured on squid, and maybe your brother could disable proxy on his client pc to bypass your "two hour template research"

;-)
I have a brother too

Tyrone Miles

Re: Internet
« Reply #4 on: September 06, 2003, 09:51:03 PM »
Thanks for the info Alejandro. What I am hoping is that I can find something that can be put into place without having to touch his computer. I want it to seem to him like the internet connection went down or something.

That way if he asks I can say "I don't know, I think the internet connection is down. "  :-)

Craig

Re: Internet
« Reply #5 on: September 07, 2003, 02:14:38 AM »
Tyrone,
What Alejandro is suggesting doesn't include touching your brothers computer.

Logon to your server then do the following.

Create a directory;
mkdir -p /etc/e-smith/templates-custom/etc/squid.conf

add what you need to the file 90block_brother
vi /etc/e-smith/templates-custom/etc/squid.conf/90block_brother
(work it out from the suggested web page, make sure to allow al others on your network!)

Expand the template:
/sbin/e-smith/expand-template /etc/squid/squid.conf

If you get no errors then restart squid:
/etc/init.d/squid restart

I haven't tested this.

Craig

Alejandro

Re: Internet
« Reply #6 on: September 09, 2003, 03:38:21 AM »
Tyrone: As per Craig comments...in that way you should get a server side connection time manager by seting up the right rules at squid.conf.
As far as I know (not really enogh at all) your brother pc is connected to the internet through the sme box acting as gateway, but if  you don't use squid as a proxy server of you network, he will be able to bypass the rules.
In other words If he doesn't use proxy he doesn't follow it´s rules.
this is by not using proxy port 3128.
so if he configures his browser not to use 3128 port he will be able to use the connection.
maybe solution is aplying rules at ipchains or somewere else.
Ale

Tyrone Miles

Re: Internet
« Reply #7 on: September 09, 2003, 04:55:21 AM »
I am using an e-smith 5.6 server as my gateway.