LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-08-2006, 02:08 PM   #1
General
Member
 
Registered: Aug 2005
Distribution: Debian 7
Posts: 526

Rep: Reputation: 31
How to block web site?


I try adding entries to the end of /etc/hosts thusly, to prevent access to a site:

Code:
127.0.0.1 = www.linuxquestions.org
This seems to work only some of the time: one minute the Web site is blocked, the next minute it isn't, with no explanation for this phenomenon.
I search all over the Web, but only find lots of other people with same question.

What am I doing wrong?
 
Old 10-08-2006, 03:39 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well that's the wrong syntax for a hosts file, there is no ='s for a valid entry, and also that's really a fairly dubious way to "block" a site... you're much better off using a proxy filter like dansguardian that relying on a fudge.
 
Old 10-08-2006, 08:07 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Or create a proxy server or setup a firewall with rules to block whatever site you don't wany anyone on the network to access.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how do you block access to a site? smarthouseguy Slackware 3 05-14-2006 10:09 AM
allow specific ip to browse the block site space_beyond Linux - Newbie 1 06-03-2005 09:15 AM
How I can block a IP to view my web site?? AZIMBD03 Linux - Networking 6 02-26-2004 03:19 PM
squid acl how to block all site except some mikmok Linux - Networking 1 12-22-2003 08:20 AM
block local user to access a site xen_chris Linux - Newbie 3 04-15-2003 09:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:37 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
Open Source Consulting | Domain Registration