Author Topic: blocking selective url in host deny? -- Solved  (Read 480 times)

Offline pelone

  • Jr. Member
  • **
  • Posts: 14
blocking selective url in host deny? -- Solved
« on: May 12, 2010, 04:06:54 PM »
I have been directed to block a few specific web sites at a community center I volunteer at due to bandwidth concerns.

I know I can disable flash, but that may effect disney and a few other 'approved' sites the kids go to.

I thought I understood I could edit etc/hosts file. I found etc/hosts.deny and typed in:
0.0.0.0 www.abz.com.

No blocking of the site. Strike one. I went back and deleted my edit. The text in hosts.deny file points me to a /sbin file, and of course I am not about to go tinker where I really don't know what I am doing.

Any direction for site blocking? It seems overkill to add more firewall programs, ie, squid, etc for a few addresses.

Thanks in advance,

pelone
« Last Edit: May 12, 2010, 06:08:06 PM by pelone »

Offline blarney

  • Hero Member
  • *****
  • Posts: 703
  • I Chose Freedom
Re: blocking selective url in host deny?
« Reply #1 on: May 12, 2010, 04:35:04 PM »
You have to point the domain to your localhost 127.0.0.1 (In your /etc/hosts file)

127.0.0.1 localhost
127.0.0.1 www.example.com

Cheers,
Blarney

« Last Edit: May 12, 2010, 04:37:18 PM by blarney »

Offline pelone

  • Jr. Member
  • **
  • Posts: 14
Re: blocking selective url in host deny? -- Solved
« Reply #2 on: May 12, 2010, 06:06:56 PM »
That did it. Thanks a bunch!

pelone