LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 09-14-2004, 01:09 PM   #1
mathew5
LQ Newbie
 
Registered: Sep 2004
Posts: 2

Rep: Reputation: 0
Question 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 !
 
Old 09-14-2004, 01:26 PM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
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
 
Old 09-14-2004, 01:33 PM   #3
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
couldn't you also put the domain names in your hosts file to redirect the browsing to localhost?
 
Old 09-14-2004, 01:36 PM   #4
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
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.
 
Old 09-14-2004, 01:41 PM   #5
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
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
 
Old 09-14-2004, 05:05 PM   #6
greybeard01
LQ Newbie
 
Registered: Sep 2004
Posts: 6

Rep: Reputation: 0
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.
 
Old 09-14-2004, 05:52 PM   #7
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
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...
 
Old 09-16-2004, 01:35 PM   #8
mathew5
LQ Newbie
 
Registered: Sep 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Many thanks !

you all were of great help !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do you know sourceforge site? How to upload to this site? TruongAn General 2 07-02-2005 06:26 AM
blocking a site with /etc/hosts corso64 Linux - Networking 6 12-03-2004 05:29 AM
Off site image blocking! brandog Linux - Networking 8 10-07-2003 12:58 PM
Google has been nice to my site. Is it nice to your site? Travis86 General 5 08-31-2003 02:38 PM
vsftp site to site mr.bienzle Linux - Software 0 01-13-2003 11:18 AM


All times are GMT -5. The time now is 06:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration