LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Site Blocking (https://www.linuxquestions.org/questions/slackware-14/site-blocking-230526/)

mathew5 09-14-2004 12:09 PM

Site Blocking
 
Hello,

Maby somebody can help me with the following problem;

I am father of two boys (seven and nine years old) and I have an ADSL connection to the internet for about two months. ADSL is working fine and since a month I even manage to run slackware linux for a NAT network.

Since a couple of weeks im aware of my suns both watching porno on the internet. This is something we don't want them to do so I tried to put the names of the sexsites (found in their history) in hosts.deny and I tried various things with iptables (which shares the internet towards the other computers) but nothing worked out.

Does anybody know a solution for us?

Thanks in advance !

Cedrik 09-14-2004 12:26 PM

Want to block sites from internet adress ? :

create a file with all IP adress you want to block, you could get them from domain name with ping command.

and a script like this :
Code:

# parameteter to change
BLOCK_FILE=/path/to/your_ip_to_block.txt

#path to iptables
IPTABLES=/usr/sbin/iptables

for IP in `cat $BLOCK_FILE`; do
    $IPTABLES -A INPUT -i eth0 -s $IP -j DROP
done

Naturally it is just an example how the thing could be done, it is not a complete iptables script as it does not deal with flushing rules, load modules etc.. It is intended to include in a firewall script

kodon 09-14-2004 12:33 PM

couldn't you also put the domain names in your hosts file to redirect the browsing to localhost?

Cedrik 09-14-2004 12:36 PM

Not a bad idea kodon ;) I know some friend did joke with that file, redirecting official sites like google to porn, the user wondered what did happen.

kodon 09-14-2004 12:41 PM

just thought i had seen something similar in a how-to on blocking banner ads



also just found this:
A parent's guide to Linux Web filtering
http://software.newsforge.com/softwa.../1521209.shtml

greybeard01 09-14-2004 04:05 PM

Site Blocking
 
I'm a parent too and am using SquidGuard to block undesirable sites for my kids. I haven't installed it on Slack and don't know if it will work. I'm using the 'SME Server' distro as a proxy server. The advantage of Squidguard is the 'blacklist' gets updated on a daily basis and I don't have to worry about keeping track of where the kids are going. Another is that I can use the Squidguard log files to see where they are trying to go, them clearing the history files on their machines doesn't clear it from my logfiles.

kodon 09-14-2004 04:52 PM

wait a minute

just realized you said SEVEN and NINE year old boys!?!?!
did they hit puberty at five? biologically, at that age they
should have no interest in girls whatsoever...

mathew5 09-16-2004 12:35 PM

Many thanks !

you all were of great help !


All times are GMT -5. The time now is 01:28 PM.