LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 10-27-2006, 09:30 AM   #1
Last Attacker
Member
 
Registered: Jun 2004
Location: South Africa
Distribution: Ubuntu
Posts: 120

Rep: Reputation: 15
DNS Website blocking


Hey guys!
Is it possible to use bind (or whatever DNS server there is on a Linux server) to block certain websites? I have SuSE 10.0 at home using bind I think. Can I block certain sites without the use of a proxy server?

Thanks
 
Old 10-27-2006, 10:09 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,457
Blog Entries: 54

Rep: Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897
Sure. Make them point to some nonexistant IANA-reserved LAN range. I use Pdnsd for that. It has a tweakable and persistent cache, it's easy to configure and has a better security track record.
 
Old 10-27-2006, 02:48 PM   #3
nayyares
Member
 
Registered: Oct 2006
Location: JNB, SA
Posts: 33

Rep: Reputation: 15
Hi,
If the sites are in yourdomain then follow these instructions:

You need to add a line in forward zone file i.e.

yourdomain.com.zone file and put this line


blockmachine IN A 192.168.0.232 #FAKE IP

-----------------------------------------------

If the sites are not in your domain then try this:

1. make a copy of yourdomain.com.zone file as blockdomain.com.zone and then edit it like this:

Quote:
$TTL 86400
$ORIGIN blockdomain.com.
@ IN SOA @ root.station1.yourdomain.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS 192.168.0.225
blockmachine IN A 192.168.0.232 #FAKE IP
enjoy
 
Old 10-29-2006, 01:09 AM   #4
Last Attacker
Member
 
Registered: Jun 2004
Location: South Africa
Distribution: Ubuntu
Posts: 120

Original Poster
Rep: Reputation: 15
Thanks nayyares!
I'm glad that there is a built in feature to block sites.
Do you maybe know of a good article that explains this in more detail? I would find this very usefull.

Cheers.
 
  


Reply

Tags
blocking, dns, webpage


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
Website blocking w/ SUSE 9.3/KDE based on groups FrankP1973 Linux - Newbie 1 11-22-2005 02:13 PM
squid website blocking? belkens Linux - Networking 2 12-11-2004 07:34 AM
Using DNS for blocking web advertising markham82 Linux - Networking 3 10-28-2004 09:44 PM
Squid is blocking me out of one particular website. danielw Linux - Software 0 07-02-2004 11:30 PM
Netgear router blocking website when using internal network esteeven Linux - Networking 8 09-30-2003 07:48 AM


All times are GMT -5. The time now is 09:02 PM.

Main Menu
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