LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   DNS Website blocking (http://www.linuxquestions.org/questions/linux-networking-3/dns-website-blocking-496081/)

Last Attacker 10-27-2006 10:30 AM

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

unSpawn 10-27-2006 11:09 AM

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.

nayyares 10-27-2006 03:48 PM

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

Last Attacker 10-29-2006 01:09 AM

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.


All times are GMT -5. The time now is 12:41 PM.