Home Restrictions

All about creating websites!
Post Reply
User avatar
hpprinter100
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 214
Joined: 19 Oct 2007, 16:00
16
Contact:

Home Restrictions

Post by hpprinter100 »

Problem: Some members of my family are spending too much time on social networking/general time wasting instead of doing work.

I have been asked to implement a block on a certain number of sites at certain times. Preferable with a web-interface. On the router i have i can block all access to the internet apart from one trusted IP + MAC.

So i was thinking of putting some sort of network proxy on my home server (ubuntu headerless),and have it as the trusted IP and have everyone connect via a network proxy.

Any recommendations on software to use?

HP

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Re: Home Restrictions

Post by bad_brain »

hm, if you use your Ubuntu box as gateway this task would actually be pretty easy to accomplish, no need for a proxy.
all you need to do is to create cronjobs which block/unblock traffic from/to specific IPs via iptables. here's a little example that blocks suck-o access between 4pm and 9pm:

Code: Select all

0     16   * * * iptables -I INPUT -s 85.25.150.199 -j DROP
0     21   * * * iptables -D INPUT 1
1st entry adds a firewall rule at the start of the INPUT chain which blocks incoming traffic from 85.25.150.199 on 4pm, the 2nd entry deletes the 1st rule in the INPUT chain again at 9pm.

to set up a cronjob is also very simple, you usually open the editor with crontab -e, add the lines you need to, and then save it with ctrl-K + ctrl-X.
:)
Image

Post Reply